@pendle/core-v2 3.0.0-beta-10 → 3.0.0-beta-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (637) hide show
  1. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
  2. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
  3. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
  4. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
  5. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
  6. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  12. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  14. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  16. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  17. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  19. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  33. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  35. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  36. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  37. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.json +2 -2
  39. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  42. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  44. package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +2 -2
  47. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +2 -2
  49. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
  64. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
  66. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
  68. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
  69. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
  70. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
  71. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
  72. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.dbg.json +1 -1
  73. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.json +2 -2
  74. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
  75. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
  76. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
  77. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
  78. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
  79. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
  80. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol/ComposableStablePreviewProxy.dbg.json +1 -1
  81. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol/ComposableStablePreviewV4.dbg.json +1 -1
  82. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol/ComposableStablePreviewV5.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
  84. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
  85. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
  86. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
  87. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
  88. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
  89. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
  90. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
  91. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +1 -1
  92. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  93. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  94. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  95. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  96. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
  97. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
  98. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
  99. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
  100. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
  101. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
  102. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.dbg.json +1 -1
  103. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.json +2 -2
  104. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol/PendleChainlinkRelayer.dbg.json +1 -1
  105. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
  106. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
  107. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
  108. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
  109. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
  110. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
  111. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
  112. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  113. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.dbg.json +1 -1
  114. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.json +2 -2
  115. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
  116. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
  117. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +1 -1
  118. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
  119. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
  120. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol/HLPPricingHelper.dbg.json +1 -1
  121. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
  122. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
  123. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
  124. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
  125. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
  126. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
  127. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
  128. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
  129. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
  130. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
  131. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
  132. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
  133. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
  134. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.json +2 -2
  135. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
  136. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
  137. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
  138. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
  139. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
  140. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
  141. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
  142. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
  143. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
  144. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.json +2 -2
  145. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  146. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  147. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
  148. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
  149. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
  150. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
  151. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
  152. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
  153. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
  154. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
  155. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
  156. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
  157. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  158. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  159. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  160. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  161. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
  162. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  163. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  164. package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
  165. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
  166. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
  167. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
  168. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
  169. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
  170. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
  171. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  172. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  173. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  174. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  175. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  176. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
  177. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  178. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  179. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -18
  180. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  181. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
  182. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  183. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  184. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
  185. package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
  186. package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +1 -1
  187. package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
  188. package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
  189. package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
  190. package/build/artifacts/contracts/interfaces/Balancer/IPComposableStablePreview.sol/IPComposableStablePreview.dbg.json +1 -1
  191. package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
  192. package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
  193. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +1 -1
  194. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +1 -1
  195. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
  196. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
  197. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +1 -1
  198. package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
  199. package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +1 -1
  200. package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.dbg.json +1 -1
  201. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
  202. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
  203. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
  204. package/build/artifacts/contracts/interfaces/Flux/IFluxErc20.sol/IFluxErc20.dbg.json +1 -1
  205. package/build/artifacts/contracts/interfaces/Flux/IFluxInterestRateModel.sol/IFluxInterestRateModel.dbg.json +1 -1
  206. package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
  207. package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
  208. package/build/artifacts/contracts/interfaces/HMX/IHLPStaking.sol/IHLPStaking.dbg.json +1 -1
  209. package/build/artifacts/contracts/interfaces/HMX/IHMXCalculator.sol/IHMXCalculator.dbg.json +1 -1
  210. package/build/artifacts/contracts/interfaces/HMX/IHMXCompounder.sol/IHMXCompounder.dbg.json +1 -1
  211. package/build/artifacts/contracts/interfaces/HMX/IHMXStaking.sol/IHMXStaking.dbg.json +1 -1
  212. package/build/artifacts/contracts/interfaces/HMX/IHMXVester.sol/IHMXVester.dbg.json +1 -1
  213. package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
  214. package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
  215. package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.dbg.json +1 -1
  216. package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.dbg.json +1 -1
  217. package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +1 -1
  218. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  219. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  220. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
  221. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +4 -0
  222. package/build/artifacts/contracts/interfaces/{IPLimitRouter.sol/ILimitOrderCallee.json → IPActionCallbackV3.sol/IPActionCallbackV3.json} +19 -28
  223. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  224. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  225. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  226. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  227. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
  228. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.json +18 -42
  229. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  230. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
  231. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
  232. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
  233. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +37 -27
  234. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  235. package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
  236. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  237. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
  238. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  239. package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
  240. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
  241. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +23 -136
  242. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +4 -0
  243. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.json +45 -0
  244. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixinType.dbg.json +1 -1
  245. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  246. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  247. package/build/artifacts/contracts/interfaces/IPMarketFactoryV2.sol/IPMarketFactoryV2.dbg.json +1 -1
  248. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  249. package/build/artifacts/contracts/interfaces/IPPtOracle.sol/IPPtOracle.dbg.json +1 -1
  250. package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
  251. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  252. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  253. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  254. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  255. package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
  256. package/build/artifacts/contracts/interfaces/IPendlePreviewHelper.sol/IPendlePreviewHelper.dbg.json +1 -1
  257. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  258. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  259. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  260. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  261. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
  262. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  263. package/build/artifacts/contracts/interfaces/IStargateLP.sol/IStargateLP.dbg.json +1 -1
  264. package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
  265. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  266. package/build/artifacts/contracts/interfaces/Lybra/IEUSD.sol/IEUSD.dbg.json +1 -1
  267. package/build/artifacts/contracts/interfaces/Stader/IStaderStakeManager.sol/IStaderStakeManager.dbg.json +1 -1
  268. package/build/artifacts/contracts/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
  269. package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
  270. package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
  271. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
  272. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
  273. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  274. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +62 -132
  275. package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.dbg.json +1 -1
  276. package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.json +255 -130
  277. package/build/artifacts/contracts/limit/helpers/ArgumentsDecoder.sol/ArgumentsDecoder.dbg.json +1 -1
  278. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
  279. package/build/artifacts/contracts/limit/helpers/Permitable.sol/Permitable.dbg.json +1 -1
  280. package/build/artifacts/contracts/limit/helpers/RevertReasonParser.sol/RevertReasonParser.dbg.json +1 -1
  281. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
  282. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
  283. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
  284. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
  285. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
  286. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  287. package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  288. package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  289. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  290. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  291. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +4 -0
  292. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +10 -0
  293. package/build/artifacts/contracts/offchain-helpers/ChainlinkRelayerGelato.sol/ChainlinkRelayerGelato.dbg.json +1 -1
  294. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
  295. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
  296. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
  297. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +4 -0
  298. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +174 -0
  299. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
  300. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
  301. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
  302. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
  303. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
  304. package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +1 -1
  305. package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.json +2 -2
  306. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +4 -0
  307. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +84 -0
  308. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
  309. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  310. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
  311. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  312. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
  313. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  314. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
  315. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  316. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
  317. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  318. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
  319. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  320. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
  321. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  322. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
  323. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  324. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  325. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
  326. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
  327. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
  328. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
  329. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
  330. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
  331. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.json +2 -2
  332. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
  333. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
  334. package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
  335. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
  336. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
  337. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +4 -0
  338. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +116 -0
  339. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
  340. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +36 -60
  341. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
  342. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
  343. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
  344. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -57
  345. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
  346. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
  347. package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +1 -1
  348. package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.dbg.json +1 -1
  349. package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.json +7 -2
  350. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  351. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  352. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  353. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  354. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  355. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  356. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  357. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  358. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
  359. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
  360. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
  361. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
  362. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
  363. package/build/artifacts/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
  364. package/build/artifacts/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
  365. package/contracts/core/libraries/Errors.sol +1 -1
  366. package/contracts/interfaces/IPActionCallbackV3.sol +7 -0
  367. package/contracts/interfaces/IPActionMiscV3.sol +1 -6
  368. package/contracts/interfaces/IPAllActionV3.sol +2 -2
  369. package/contracts/interfaces/IPLimitRouter.sol +11 -47
  370. package/contracts/limit/LimitMathCore.sol +17 -99
  371. package/contracts/limit/PendleLimitRouter.sol +7 -5
  372. package/contracts/limit/PendleOrderMixin.sol +38 -148
  373. package/contracts/offchain-helpers/BytesLib.sol +539 -0
  374. package/contracts/offchain-helpers/LimitBackendHelper.sol +100 -0
  375. package/contracts/offchain-helpers/SimulateHelper.sol +41 -0
  376. package/contracts/router/{base/ActionBaseCallback.sol → ActionCallbackV3.sol} +57 -9
  377. package/contracts/router/ActionMiscV3.sol +4 -13
  378. package/contracts/router/ActionSwapYTV3.sol +2 -2
  379. package/contracts/router/PendleRouterV3.sol +52 -45
  380. package/contracts/router/base/ActionBase.sol +13 -8
  381. package/deployments/42161-core.json +2 -1
  382. package/package.json +1 -1
  383. package/typechain-types/AccessControlUpgradeable.ts +369 -0
  384. package/typechain-types/ActionAddRemoveLiq.ts +1239 -0
  385. package/typechain-types/ActionCallbackV3.ts +164 -0
  386. package/typechain-types/ActionMintRedeem.ts +673 -0
  387. package/typechain-types/ActionMisc.ts +155 -0
  388. package/typechain-types/ActionMiscV3.ts +36 -75
  389. package/typechain-types/ActionSwapPT.ts +544 -0
  390. package/typechain-types/ActionSwapYT.ts +730 -0
  391. package/typechain-types/ActionSwapYTV3.ts +0 -44
  392. package/typechain-types/AuraWethVethSYUpg.ts +1612 -0
  393. package/typechain-types/BeaconProxy.ts +97 -0
  394. package/typechain-types/BulkSeller.ts +743 -0
  395. package/typechain-types/BulkSellerFactory.ts +712 -0
  396. package/typechain-types/BulkSellerOffchain.ts +251 -0
  397. package/typechain-types/ContextUpgradeable.ts +68 -0
  398. package/typechain-types/EIP712.ts +135 -0
  399. package/typechain-types/ERC165Upgradeable.ts +113 -0
  400. package/typechain-types/GMTokenPricingHelper.ts +478 -0
  401. package/typechain-types/IAccessControlUpgradeable.ts +305 -0
  402. package/typechain-types/IAggregationExecutorOptimistic.ts +394 -0
  403. package/typechain-types/IERC165Upgradeable.ts +102 -0
  404. package/typechain-types/IERC1967.ts +97 -0
  405. package/typechain-types/IERC5267.ts +135 -0
  406. package/typechain-types/IERC5267Upgradeable.ts +135 -0
  407. package/typechain-types/IExecutorHelperL2.ts +2272 -0
  408. package/typechain-types/IGMXPriceHelper.ts +84 -0
  409. package/typechain-types/IGMXV2DataStore.ts +87 -0
  410. package/typechain-types/IGMXV2Oracle.ts +107 -0
  411. package/typechain-types/IGMXV2Reader.ts +204 -0
  412. package/typechain-types/IKyberElasticFactory.ts +734 -0
  413. package/typechain-types/IKyberElasticPool.ts +514 -0
  414. package/typechain-types/IKyberElasticRouter.ts +315 -0
  415. package/typechain-types/IKyberLiquidityMining.ts +968 -0
  416. package/typechain-types/IKyberMathHelper.ts +231 -0
  417. package/typechain-types/IKyberPositionManager.ts +773 -0
  418. package/typechain-types/IMUXRewardRouter.ts +1599 -0
  419. package/typechain-types/IPActionAddRemoveLiq.ts +1239 -0
  420. package/typechain-types/IPActionCallbackV3.ts +164 -0
  421. package/typechain-types/IPActionMintRedeem.ts +673 -0
  422. package/typechain-types/IPActionMisc.ts +155 -0
  423. package/typechain-types/IPActionMiscV3.ts +36 -75
  424. package/typechain-types/IPActionSwapPT.ts +544 -0
  425. package/typechain-types/IPActionSwapYT.ts +686 -0
  426. package/typechain-types/IPAllAction.ts +2935 -0
  427. package/typechain-types/IPAllActionV3.ts +70 -60
  428. package/typechain-types/IPBulkSeller.ts +391 -0
  429. package/typechain-types/IPBulkSellerCallback.ts +115 -0
  430. package/typechain-types/IPBulkSellerFactory.ts +152 -0
  431. package/typechain-types/IPLimitRouter.ts +39 -72
  432. package/typechain-types/IPLimitRouterCallback.ts +120 -0
  433. package/typechain-types/IPLinearDistributor.ts +199 -0
  434. package/typechain-types/IPMarketFactoryV3.ts +225 -0
  435. package/typechain-types/IPMarketV3.ts +1068 -0
  436. package/typechain-types/IPOffchainStorage.ts +146 -0
  437. package/typechain-types/IPPriceFeed.ts +81 -0
  438. package/typechain-types/ISilo.ts +1093 -0
  439. package/typechain-types/ISiloIncentiveController.ts +129 -0
  440. package/typechain-types/ISiloLens.ts +107 -0
  441. package/typechain-types/KyberMathHelper.ts +604 -0
  442. package/typechain-types/KyberNftManagerBaseUpg.ts +148 -0
  443. package/typechain-types/LimitBackendHelper.ts +287 -0
  444. package/typechain-types/MlpPricingHelper.ts +397 -0
  445. package/typechain-types/PendleAuraBalancerStableLPSYV3Upg.ts +1577 -0
  446. package/typechain-types/PendleERC20PermitUpg.ts +517 -0
  447. package/typechain-types/PendleERC20Upg.ts +348 -0
  448. package/typechain-types/PendleGMV2TokenSY.ts +1434 -0
  449. package/typechain-types/PendleKyberElasticSYUpg.ts +1648 -0
  450. package/typechain-types/PendleLimitRouter.ts +110 -92
  451. package/typechain-types/PendleLinearDistributor.ts +829 -0
  452. package/typechain-types/PendleMarketFactoryV3.ts +719 -0
  453. package/typechain-types/PendleMarketV3.ts +1364 -0
  454. package/typechain-types/PendleMlpSY.ts +1606 -0
  455. package/typechain-types/PendleOffchainStorage.ts +666 -0
  456. package/typechain-types/PendleOrderMixin.ts +292 -92
  457. package/typechain-types/PendleRouter.ts +217 -0
  458. package/typechain-types/PendleRouterHelper2.ts +185 -0
  459. package/typechain-types/PendleSiloWithIncentiveSY.ts +1455 -0
  460. package/typechain-types/PendleSwapBase.ts +126 -0
  461. package/typechain-types/PendleSwapL1.ts +126 -0
  462. package/typechain-types/PendleSwapL2.ts +126 -0
  463. package/typechain-types/ReentrancyGuardUpgradeable.ts +68 -0
  464. package/typechain-types/SYBaseUpg.ts +1270 -0
  465. package/typechain-types/SYBaseWithRewardsUpg.ts +1363 -0
  466. package/typechain-types/ShortStrings.ts +57 -0
  467. package/typechain-types/SimulateHelper.ts +42 -35
  468. package/typechain-types/factories/AccessControlUpgradeable__factory.ts +247 -0
  469. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
  470. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1676 -0
  471. package/typechain-types/factories/ActionBaseCallback__factory.ts +59 -0
  472. package/typechain-types/factories/ActionCallbackV3__factory.ts +169 -0
  473. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  474. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  475. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  476. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  477. package/typechain-types/factories/ActionMintRedeem__factory.ts +806 -0
  478. package/typechain-types/factories/ActionMiscV3__factory.ts +35 -59
  479. package/typechain-types/factories/ActionMisc__factory.ts +129 -0
  480. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  481. package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
  482. package/typechain-types/factories/ActionSwapPT__factory.ts +770 -0
  483. package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -56
  484. package/typechain-types/factories/ActionSwapYT__factory.ts +1041 -0
  485. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  486. package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
  487. package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
  488. package/typechain-types/factories/AuraWethVethSYUpg__factory.ts +1264 -0
  489. package/typechain-types/factories/BeaconProxy__factory.ts +141 -0
  490. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  491. package/typechain-types/factories/BulkSellerFactory__factory.ts +574 -0
  492. package/typechain-types/factories/BulkSellerOffchain__factory.ts +178 -0
  493. package/typechain-types/factories/BulkSeller__factory.ts +692 -0
  494. package/typechain-types/factories/ContextUpgradeable__factory.ts +39 -0
  495. package/typechain-types/factories/EIP712__factory.ts +85 -0
  496. package/typechain-types/factories/ERC165Upgradeable__factory.ts +58 -0
  497. package/typechain-types/factories/Errors__factory.ts +17 -17
  498. package/typechain-types/factories/GMTokenPricingHelper__factory.ts +354 -0
  499. package/typechain-types/factories/IAccessControlUpgradeable__factory.ts +202 -0
  500. package/typechain-types/factories/IAggregationExecutorOptimistic__factory.ts +213 -0
  501. package/typechain-types/factories/IERC165Upgradeable__factory.ts +45 -0
  502. package/typechain-types/factories/IERC1967__factory.ts +68 -0
  503. package/typechain-types/factories/IERC5267Upgradeable__factory.ts +75 -0
  504. package/typechain-types/factories/IERC5267__factory.ts +72 -0
  505. package/typechain-types/factories/IExecutorHelperL2__factory.ts +1862 -0
  506. package/typechain-types/factories/IGMXPriceHelper__factory.ts +45 -0
  507. package/typechain-types/factories/IGMXV2DataStore__factory.ts +45 -0
  508. package/typechain-types/factories/IGMXV2Oracle__factory.ts +47 -0
  509. package/typechain-types/factories/IGMXV2Reader__factory.ts +192 -0
  510. package/typechain-types/factories/IKyberElasticFactory__factory.ts +455 -0
  511. package/typechain-types/factories/IKyberElasticPool__factory.ts +315 -0
  512. package/typechain-types/factories/IKyberElasticRouter__factory.ts +240 -0
  513. package/typechain-types/factories/IKyberLiquidityMining__factory.ts +913 -0
  514. package/typechain-types/factories/IKyberMathHelper__factory.ts +143 -0
  515. package/typechain-types/factories/IKyberPositionManager__factory.ts +633 -0
  516. package/typechain-types/factories/IMUXRewardRouter__factory.ts +885 -0
  517. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +1446 -0
  518. package/typechain-types/factories/IPActionCallbackV3__factory.ts +83 -0
  519. package/typechain-types/factories/IPActionMintRedeem__factory.ts +720 -0
  520. package/typechain-types/factories/IPActionMiscV3__factory.ts +18 -42
  521. package/typechain-types/factories/IPActionMisc__factory.ts +91 -0
  522. package/typechain-types/factories/IPActionSwapPT__factory.ts +544 -0
  523. package/typechain-types/factories/IPActionSwapYT__factory.ts +723 -0
  524. package/typechain-types/factories/IPAllActionV3__factory.ts +37 -27
  525. package/typechain-types/factories/IPAllAction__factory.ts +3515 -0
  526. package/typechain-types/factories/IPBulkSellerCallback__factory.ts +53 -0
  527. package/typechain-types/factories/IPBulkSellerFactory__factory.ts +107 -0
  528. package/typechain-types/factories/IPBulkSeller__factory.ts +333 -0
  529. package/typechain-types/factories/IPLimitRouterCallback__factory.ts +64 -0
  530. package/typechain-types/factories/IPLimitRouter__factory.ts +23 -136
  531. package/typechain-types/factories/IPLinearDistributor__factory.ts +150 -0
  532. package/typechain-types/factories/IPMarketFactoryV3__factory.ts +160 -0
  533. package/typechain-types/factories/IPMarketV3__factory.ts +845 -0
  534. package/typechain-types/factories/IPOffchainStorage__factory.ts +82 -0
  535. package/typechain-types/factories/IPPriceFeed__factory.ts +36 -0
  536. package/typechain-types/factories/ISiloIncentiveController__factory.ts +67 -0
  537. package/typechain-types/factories/ISiloLens__factory.ts +47 -0
  538. package/typechain-types/factories/ISilo__factory.ts +846 -0
  539. package/typechain-types/factories/KyberMathHelper__factory.ts +430 -0
  540. package/typechain-types/factories/KyberNftManagerBaseUpg__factory.ts +101 -0
  541. package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
  542. package/typechain-types/factories/MlpPricingHelper__factory.ts +303 -0
  543. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  544. package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
  545. package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
  546. package/typechain-types/factories/PendleAuraBalancerStableLPSYV3Upg__factory.ts +1209 -0
  547. package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
  548. package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
  549. package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
  550. package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
  551. package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
  552. package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
  553. package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
  554. package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
  555. package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
  556. package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +1 -1
  557. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
  558. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
  559. package/typechain-types/factories/PendleERC20PermitUpg__factory.ts +389 -0
  560. package/typechain-types/factories/PendleERC20Upg__factory.ts +261 -0
  561. package/typechain-types/factories/PendleERC4626SY__factory.ts +1 -1
  562. package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
  563. package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
  564. package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
  565. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  566. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  567. package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
  568. package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
  569. package/typechain-types/factories/PendleGMV2TokenSY__factory.ts +1240 -0
  570. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  571. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  572. package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
  573. package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
  574. package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1351 -0
  575. package/typechain-types/factories/PendleLimitRouter__factory.ts +61 -131
  576. package/typechain-types/factories/PendleLinearDistributor__factory.ts +627 -0
  577. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
  578. package/typechain-types/factories/PendleLpGlpOracle__factory.ts +1 -1
  579. package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
  580. package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
  581. package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +714 -0
  582. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  583. package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
  584. package/typechain-types/factories/PendleMarketV3__factory.ts +1351 -0
  585. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  586. package/typechain-types/factories/PendleMlpSY__factory.ts +1314 -0
  587. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  588. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  589. package/typechain-types/factories/PendleOffchainStorage__factory.ts +492 -0
  590. package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
  591. package/typechain-types/factories/PendleOrderMixin__factory.ts +254 -129
  592. package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
  593. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  594. package/typechain-types/factories/PendlePtGlpOracle__factory.ts +1 -1
  595. package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
  596. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  597. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  598. package/typechain-types/factories/PendleRouterHelper2__factory.ts +206 -0
  599. package/typechain-types/factories/PendleRouterHelper__factory.ts +1 -1
  600. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  601. package/typechain-types/factories/PendleRouterV3__factory.ts +10 -1
  602. package/typechain-types/factories/PendleRouter__factory.ts +264 -0
  603. package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
  604. package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1266 -0
  605. package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
  606. package/typechain-types/factories/PendleSwapBase__factory.ts +91 -0
  607. package/typechain-types/factories/PendleSwapL1__factory.ts +126 -0
  608. package/typechain-types/factories/PendleSwapL2__factory.ts +126 -0
  609. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  610. package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
  611. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  612. package/typechain-types/factories/PendleWbEthSY__factory.ts +1 -1
  613. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  614. package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
  615. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  616. package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
  617. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  618. package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
  619. package/typechain-types/factories/ReentrancyGuardUpgradeable__factory.ts +43 -0
  620. package/typechain-types/factories/SAPE__factory.ts +1 -1
  621. package/typechain-types/factories/SYBaseUpg__factory.ts +988 -0
  622. package/typechain-types/factories/SYBaseWithRewardsUpg__factory.ts +1061 -0
  623. package/typechain-types/factories/ShortStrings__factory.ts +77 -0
  624. package/typechain-types/factories/SimulateHelper__factory.ts +71 -18
  625. package/typechain-types/factories/SwETHSY__factory.ts +1 -1
  626. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  627. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  628. package/typechain-types/hardhat.d.ts +763 -16
  629. package/typechain-types/index.ts +160 -6
  630. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/ILimitOrderCallee.dbg.json +0 -4
  631. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.dbg.json +0 -4
  632. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.json +0 -438
  633. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +0 -4
  634. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +0 -82
  635. package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.dbg.json +0 -4
  636. package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.json +0 -69
  637. package/contracts/router/base/SimulateHelper.sol +0 -33
@@ -0,0 +1,539 @@
1
+ // SPDX-License-Identifier: Unlicense
2
+ /*
3
+ * @title Solidity Bytes Arrays Utils
4
+ * @author Gonçalo Sá <goncalo.sa@consensys.net>
5
+ *
6
+ * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
7
+ * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
8
+ */
9
+ pragma solidity >=0.8.0 <0.9.0;
10
+
11
+ library BytesLib {
12
+ function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {
13
+ bytes memory tempBytes;
14
+
15
+ assembly {
16
+ // Get a location of some free memory and store it in tempBytes as
17
+ // Solidity does for memory variables.
18
+ tempBytes := mload(0x40)
19
+
20
+ // Store the length of the first bytes array at the beginning of
21
+ // the memory for tempBytes.
22
+ let length := mload(_preBytes)
23
+ mstore(tempBytes, length)
24
+
25
+ // Maintain a memory counter for the current write location in the
26
+ // temp bytes array by adding the 32 bytes for the array length to
27
+ // the starting location.
28
+ let mc := add(tempBytes, 0x20)
29
+ // Stop copying when the memory counter reaches the length of the
30
+ // first bytes array.
31
+ let end := add(mc, length)
32
+
33
+ for {
34
+ // Initialize a copy counter to the start of the _preBytes data,
35
+ // 32 bytes into its memory.
36
+ let cc := add(_preBytes, 0x20)
37
+ } lt(mc, end) {
38
+ // Increase both counters by 32 bytes each iteration.
39
+ mc := add(mc, 0x20)
40
+ cc := add(cc, 0x20)
41
+ } {
42
+ // Write the _preBytes data into the tempBytes memory 32 bytes
43
+ // at a time.
44
+ mstore(mc, mload(cc))
45
+ }
46
+
47
+ // Add the length of _postBytes to the current length of tempBytes
48
+ // and store it as the new length in the first 32 bytes of the
49
+ // tempBytes memory.
50
+ length := mload(_postBytes)
51
+ mstore(tempBytes, add(length, mload(tempBytes)))
52
+
53
+ // Move the memory counter back from a multiple of 0x20 to the
54
+ // actual end of the _preBytes data.
55
+ mc := end
56
+ // Stop copying when the memory counter reaches the new combined
57
+ // length of the arrays.
58
+ end := add(mc, length)
59
+
60
+ for { let cc := add(_postBytes, 0x20) } lt(mc, end) {
61
+ mc := add(mc, 0x20)
62
+ cc := add(cc, 0x20)
63
+ } { mstore(mc, mload(cc)) }
64
+
65
+ // Update the free-memory pointer by padding our last write location
66
+ // to 32 bytes: add 31 bytes to the end of tempBytes to move to the
67
+ // next 32 byte block, then round down to the nearest multiple of
68
+ // 32. If the sum of the length of the two arrays is zero then add
69
+ // one before rounding down to leave a blank 32 bytes (the length block with 0).
70
+ mstore(
71
+ 0x40,
72
+ and(
73
+ add(add(end, iszero(add(length, mload(_preBytes)))), 31),
74
+ not(31) // Round down to the nearest 32 bytes.
75
+ )
76
+ )
77
+ }
78
+
79
+ return tempBytes;
80
+ }
81
+
82
+ function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {
83
+ assembly {
84
+ // Read the first 32 bytes of _preBytes storage, which is the length
85
+ // of the array. (We don't need to use the offset into the slot
86
+ // because arrays use the entire slot.)
87
+ let fslot := sload(_preBytes.slot)
88
+ // Arrays of 31 bytes or less have an even value in their slot,
89
+ // while longer arrays have an odd value. The actual length is
90
+ // the slot divided by two for odd values, and the lowest order
91
+ // byte divided by two for even values.
92
+ // If the slot is even, bitwise and the slot with 255 and divide by
93
+ // two to get the length. If the slot is odd, bitwise and the slot
94
+ // with -1 and divide by two.
95
+ let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
96
+ let mlength := mload(_postBytes)
97
+ let newlength := add(slength, mlength)
98
+ // slength can contain both the length and contents of the array
99
+ // if length < 32 bytes so let's prepare for that
100
+ // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
101
+ switch add(lt(slength, 32), lt(newlength, 32))
102
+ case 2 {
103
+ // Since the new array still fits in the slot, we just need to
104
+ // update the contents of the slot.
105
+ // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
106
+ sstore(
107
+ _preBytes.slot,
108
+ // all the modifications to the slot are inside this
109
+ // next block
110
+ add(
111
+ // we can just add to the slot contents because the
112
+ // bytes we want to change are the LSBs
113
+ fslot,
114
+ add(
115
+ mul(
116
+ div(
117
+ // load the bytes from memory
118
+ mload(add(_postBytes, 0x20)),
119
+ // zero all bytes to the right
120
+ exp(0x100, sub(32, mlength))
121
+ ),
122
+ // and now shift left the number of bytes to
123
+ // leave space for the length in the slot
124
+ exp(0x100, sub(32, newlength))
125
+ ),
126
+ // increase length by the double of the memory
127
+ // bytes length
128
+ mul(mlength, 2)
129
+ )
130
+ )
131
+ )
132
+ }
133
+ case 1 {
134
+ // The stored value fits in the slot, but the combined value
135
+ // will exceed it.
136
+ // get the keccak hash to get the contents of the array
137
+ mstore(0x0, _preBytes.slot)
138
+ let sc := add(keccak256(0x0, 0x20), div(slength, 32))
139
+
140
+ // save new length
141
+ sstore(_preBytes.slot, add(mul(newlength, 2), 1))
142
+
143
+ // The contents of the _postBytes array start 32 bytes into
144
+ // the structure. Our first read should obtain the `submod`
145
+ // bytes that can fit into the unused space in the last word
146
+ // of the stored array. To get this, we read 32 bytes starting
147
+ // from `submod`, so the data we read overlaps with the array
148
+ // contents by `submod` bytes. Masking the lowest-order
149
+ // `submod` bytes allows us to add that value directly to the
150
+ // stored value.
151
+
152
+ let submod := sub(32, slength)
153
+ let mc := add(_postBytes, submod)
154
+ let end := add(_postBytes, mlength)
155
+ let mask := sub(exp(0x100, submod), 1)
156
+
157
+ sstore(
158
+ sc,
159
+ add(
160
+ and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00),
161
+ and(mload(mc), mask)
162
+ )
163
+ )
164
+
165
+ for {
166
+ mc := add(mc, 0x20)
167
+ sc := add(sc, 1)
168
+ } lt(mc, end) {
169
+ sc := add(sc, 1)
170
+ mc := add(mc, 0x20)
171
+ } { sstore(sc, mload(mc)) }
172
+
173
+ mask := exp(0x100, sub(mc, end))
174
+
175
+ sstore(sc, mul(div(mload(mc), mask), mask))
176
+ }
177
+ default {
178
+ // get the keccak hash to get the contents of the array
179
+ mstore(0x0, _preBytes.slot)
180
+ // Start copying to the last used word of the stored array.
181
+ let sc := add(keccak256(0x0, 0x20), div(slength, 32))
182
+
183
+ // save new length
184
+ sstore(_preBytes.slot, add(mul(newlength, 2), 1))
185
+
186
+ // Copy over the first `submod` bytes of the new data as in
187
+ // case 1 above.
188
+ let slengthmod := mod(slength, 32)
189
+ let mlengthmod := mod(mlength, 32)
190
+ let submod := sub(32, slengthmod)
191
+ let mc := add(_postBytes, submod)
192
+ let end := add(_postBytes, mlength)
193
+ let mask := sub(exp(0x100, submod), 1)
194
+
195
+ sstore(sc, add(sload(sc), and(mload(mc), mask)))
196
+
197
+ for {
198
+ sc := add(sc, 1)
199
+ mc := add(mc, 0x20)
200
+ } lt(mc, end) {
201
+ sc := add(sc, 1)
202
+ mc := add(mc, 0x20)
203
+ } { sstore(sc, mload(mc)) }
204
+
205
+ mask := exp(0x100, sub(mc, end))
206
+
207
+ sstore(sc, mul(div(mload(mc), mask), mask))
208
+ }
209
+ }
210
+ }
211
+
212
+ function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {
213
+ require(_length + 31 >= _length, "slice_overflow");
214
+ require(_bytes.length >= _start + _length, "slice_outOfBounds");
215
+
216
+ bytes memory tempBytes;
217
+
218
+ assembly {
219
+ switch iszero(_length)
220
+ case 0 {
221
+ // Get a location of some free memory and store it in tempBytes as
222
+ // Solidity does for memory variables.
223
+ tempBytes := mload(0x40)
224
+
225
+ // The first word of the slice result is potentially a partial
226
+ // word read from the original array. To read it, we calculate
227
+ // the length of that partial word and start copying that many
228
+ // bytes into the array. The first word we copy will start with
229
+ // data we don't care about, but the last `lengthmod` bytes will
230
+ // land at the beginning of the contents of the new array. When
231
+ // we're done copying, we overwrite the full first word with
232
+ // the actual length of the slice.
233
+ let lengthmod := and(_length, 31)
234
+
235
+ // The multiplication in the next line is necessary
236
+ // because when slicing multiples of 32 bytes (lengthmod == 0)
237
+ // the following copy loop was copying the origin's length
238
+ // and then ending prematurely not copying everything it should.
239
+ let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
240
+ let end := add(mc, _length)
241
+
242
+ for {
243
+ // The multiplication in the next line has the same exact purpose
244
+ // as the one above.
245
+ let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
246
+ } lt(mc, end) {
247
+ mc := add(mc, 0x20)
248
+ cc := add(cc, 0x20)
249
+ } { mstore(mc, mload(cc)) }
250
+
251
+ mstore(tempBytes, _length)
252
+
253
+ //update free-memory pointer
254
+ //allocating the array padded to 32 bytes like the compiler does now
255
+ mstore(0x40, and(add(mc, 31), not(31)))
256
+ }
257
+ //if we want a zero-length slice let's just return a zero-length array
258
+ default {
259
+ tempBytes := mload(0x40)
260
+ //zero out the 32 bytes slice we are about to return
261
+ //we need to do it because Solidity does not garbage collect
262
+ mstore(tempBytes, 0)
263
+
264
+ mstore(0x40, add(tempBytes, 0x20))
265
+ }
266
+ }
267
+
268
+ return tempBytes;
269
+ }
270
+
271
+ function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
272
+ require(_bytes.length >= _start + 20, "toAddress_outOfBounds");
273
+ address tempAddress;
274
+
275
+ assembly {
276
+ tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
277
+ }
278
+
279
+ return tempAddress;
280
+ }
281
+
282
+ function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {
283
+ require(_bytes.length >= _start + 1, "toUint8_outOfBounds");
284
+ uint8 tempUint;
285
+
286
+ assembly {
287
+ tempUint := mload(add(add(_bytes, 0x1), _start))
288
+ }
289
+
290
+ return tempUint;
291
+ }
292
+
293
+ function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {
294
+ require(_bytes.length >= _start + 2, "toUint16_outOfBounds");
295
+ uint16 tempUint;
296
+
297
+ assembly {
298
+ tempUint := mload(add(add(_bytes, 0x2), _start))
299
+ }
300
+
301
+ return tempUint;
302
+ }
303
+
304
+ function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {
305
+ require(_bytes.length >= _start + 4, "toUint32_outOfBounds");
306
+ uint32 tempUint;
307
+
308
+ assembly {
309
+ tempUint := mload(add(add(_bytes, 0x4), _start))
310
+ }
311
+
312
+ return tempUint;
313
+ }
314
+
315
+ function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {
316
+ require(_bytes.length >= _start + 8, "toUint64_outOfBounds");
317
+ uint64 tempUint;
318
+
319
+ assembly {
320
+ tempUint := mload(add(add(_bytes, 0x8), _start))
321
+ }
322
+
323
+ return tempUint;
324
+ }
325
+
326
+ function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {
327
+ require(_bytes.length >= _start + 12, "toUint96_outOfBounds");
328
+ uint96 tempUint;
329
+
330
+ assembly {
331
+ tempUint := mload(add(add(_bytes, 0xc), _start))
332
+ }
333
+
334
+ return tempUint;
335
+ }
336
+
337
+ function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {
338
+ require(_bytes.length >= _start + 16, "toUint128_outOfBounds");
339
+ uint128 tempUint;
340
+
341
+ assembly {
342
+ tempUint := mload(add(add(_bytes, 0x10), _start))
343
+ }
344
+
345
+ return tempUint;
346
+ }
347
+
348
+ function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {
349
+ require(_bytes.length >= _start + 32, "toUint256_outOfBounds");
350
+ uint256 tempUint;
351
+
352
+ assembly {
353
+ tempUint := mload(add(add(_bytes, 0x20), _start))
354
+ }
355
+
356
+ return tempUint;
357
+ }
358
+
359
+ function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {
360
+ require(_bytes.length >= _start + 32, "toBytes32_outOfBounds");
361
+ bytes32 tempBytes32;
362
+
363
+ assembly {
364
+ tempBytes32 := mload(add(add(_bytes, 0x20), _start))
365
+ }
366
+
367
+ return tempBytes32;
368
+ }
369
+
370
+ function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
371
+ bool success = true;
372
+
373
+ assembly {
374
+ let length := mload(_preBytes)
375
+
376
+ // if lengths don't match the arrays are not equal
377
+ switch eq(length, mload(_postBytes))
378
+ case 1 {
379
+ // cb is a circuit breaker in the for loop since there's
380
+ // no said feature for inline assembly loops
381
+ // cb = 1 - don't breaker
382
+ // cb = 0 - break
383
+ let cb := 1
384
+
385
+ let mc := add(_preBytes, 0x20)
386
+ let end := add(mc, length)
387
+
388
+ for { let cc := add(_postBytes, 0x20) }
389
+ // the next line is the loop condition:
390
+ // while(uint256(mc < end) + cb == 2)
391
+ eq(add(lt(mc, end), cb), 2) {
392
+ mc := add(mc, 0x20)
393
+ cc := add(cc, 0x20)
394
+ } {
395
+ // if any of these checks fails then arrays are not equal
396
+ if iszero(eq(mload(mc), mload(cc))) {
397
+ // unsuccess:
398
+ success := 0
399
+ cb := 0
400
+ }
401
+ }
402
+ }
403
+ default {
404
+ // unsuccess:
405
+ success := 0
406
+ }
407
+ }
408
+
409
+ return success;
410
+ }
411
+
412
+ function equal_nonAligned(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
413
+ bool success = true;
414
+
415
+ assembly {
416
+ let length := mload(_preBytes)
417
+
418
+ // if lengths don't match the arrays are not equal
419
+ switch eq(length, mload(_postBytes))
420
+ case 1 {
421
+ // cb is a circuit breaker in the for loop since there's
422
+ // no said feature for inline assembly loops
423
+ // cb = 1 - don't breaker
424
+ // cb = 0 - break
425
+ let cb := 1
426
+
427
+ let endMinusWord := add(_preBytes, length)
428
+ let mc := add(_preBytes, 0x20)
429
+ let cc := add(_postBytes, 0x20)
430
+
431
+ for {
432
+ // the next line is the loop condition:
433
+ // while(uint256(mc < endWord) + cb == 2)
434
+ } eq(add(lt(mc, endMinusWord), cb), 2) {
435
+ mc := add(mc, 0x20)
436
+ cc := add(cc, 0x20)
437
+ } {
438
+ // if any of these checks fails then arrays are not equal
439
+ if iszero(eq(mload(mc), mload(cc))) {
440
+ // unsuccess:
441
+ success := 0
442
+ cb := 0
443
+ }
444
+ }
445
+
446
+ // Only if still successful
447
+ // For <1 word tail bytes
448
+ if gt(success, 0) {
449
+ // Get the remainder of length/32
450
+ // length % 32 = AND(length, 32 - 1)
451
+ let numTailBytes := and(length, 0x1f)
452
+ let mcRem := mload(mc)
453
+ let ccRem := mload(cc)
454
+ for { let i := 0 }
455
+ // the next line is the loop condition:
456
+ // while(uint256(i < numTailBytes) + cb == 2)
457
+ eq(add(lt(i, numTailBytes), cb), 2) { i := add(i, 1) } {
458
+ if iszero(eq(byte(i, mcRem), byte(i, ccRem))) {
459
+ // unsuccess:
460
+ success := 0
461
+ cb := 0
462
+ }
463
+ }
464
+ }
465
+ }
466
+ default {
467
+ // unsuccess:
468
+ success := 0
469
+ }
470
+ }
471
+
472
+ return success;
473
+ }
474
+
475
+ function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {
476
+ bool success = true;
477
+
478
+ assembly {
479
+ // we know _preBytes_offset is 0
480
+ let fslot := sload(_preBytes.slot)
481
+ // Decode the length of the stored array like in concatStorage().
482
+ let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
483
+ let mlength := mload(_postBytes)
484
+
485
+ // if lengths don't match the arrays are not equal
486
+ switch eq(slength, mlength)
487
+ case 1 {
488
+ // slength can contain both the length and contents of the array
489
+ // if length < 32 bytes so let's prepare for that
490
+ // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
491
+ if iszero(iszero(slength)) {
492
+ switch lt(slength, 32)
493
+ case 1 {
494
+ // blank the last byte which is the length
495
+ fslot := mul(div(fslot, 0x100), 0x100)
496
+
497
+ if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
498
+ // unsuccess:
499
+ success := 0
500
+ }
501
+ }
502
+ default {
503
+ // cb is a circuit breaker in the for loop since there's
504
+ // no said feature for inline assembly loops
505
+ // cb = 1 - don't breaker
506
+ // cb = 0 - break
507
+ let cb := 1
508
+
509
+ // get the keccak hash to get the contents of the array
510
+ mstore(0x0, _preBytes.slot)
511
+ let sc := keccak256(0x0, 0x20)
512
+
513
+ let mc := add(_postBytes, 0x20)
514
+ let end := add(mc, mlength)
515
+
516
+ // the next line is the loop condition:
517
+ // while(uint256(mc < end) + cb == 2)
518
+ for {} eq(add(lt(mc, end), cb), 2) {
519
+ sc := add(sc, 1)
520
+ mc := add(mc, 0x20)
521
+ } {
522
+ if iszero(eq(sload(sc), mload(mc))) {
523
+ // unsuccess:
524
+ success := 0
525
+ cb := 0
526
+ }
527
+ }
528
+ }
529
+ }
530
+ }
531
+ default {
532
+ // unsuccess:
533
+ success := 0
534
+ }
535
+ }
536
+
537
+ return success;
538
+ }
539
+ }
@@ -0,0 +1,100 @@
1
+ // SPDX-License-Identifier: MIT
2
+
3
+ pragma solidity ^0.8.17;
4
+
5
+ import "../interfaces/IPLimitRouter.sol";
6
+ import "../core/libraries/TokenHelper.sol";
7
+ import "../interfaces/IStandardizedYield.sol";
8
+ import "../interfaces/IWETH.sol";
9
+ import "../core/libraries/Errors.sol";
10
+ import "./BytesLib.sol";
11
+
12
+ contract LimitBackendHelper is TokenHelper {
13
+ address private immutable WNATIVE;
14
+ address private immutable original;
15
+
16
+ constructor(address _WNATIVE) {
17
+ WNATIVE = _WNATIVE;
18
+ original = address(this);
19
+ }
20
+
21
+ /// @notice vanilla read
22
+ function readSingleToken(address token, address[] calldata owners, address spender)
23
+ public
24
+ view
25
+ returns (uint256[] memory balances, uint256[] memory allowances)
26
+ {
27
+ balances = new uint256[](owners.length);
28
+ allowances = new uint256[](owners.length);
29
+ for (uint256 i = 0; i < owners.length; i++) {
30
+ balances[i] = IERC20(token).balanceOf(owners[i]);
31
+ allowances[i] = IERC20(token).allowance(owners[i], spender);
32
+ }
33
+ }
34
+
35
+ /// @notice auto return balances and allowances the input tokens of the orders, based on type
36
+ function readMultiTokens(address[] calldata tokens, address[] calldata owners, address spender)
37
+ public
38
+ view
39
+ returns (uint256[] memory balances, uint256[] memory allowances)
40
+ {
41
+ require(tokens.length == owners.length, "Length mismatch");
42
+ balances = new uint256[](owners.length);
43
+ allowances = new uint256[](owners.length);
44
+ for (uint256 i = 0; i < owners.length; i++) {
45
+ balances[i] = IERC20(tokens[i]).balanceOf(owners[i]);
46
+ allowances[i] = IERC20(tokens[i]).allowance(owners[i], spender);
47
+ }
48
+ }
49
+
50
+ /// @notice to be delegatecall from LimitRouter
51
+ function mintSyFromTokens(
52
+ address YT,
53
+ address[] calldata makers,
54
+ address[] calldata tokens,
55
+ uint256[] calldata amounts
56
+ ) external returns (uint256[] memory minted) {
57
+ uint256 length = makers.length;
58
+
59
+ address SY = IPYieldToken(YT).SY();
60
+ minted = new uint256[](length);
61
+
62
+ for (uint256 i = 0; i < length; i++) {
63
+ (, bytes memory result) = original.delegatecall(
64
+ abi.encodeWithSignature(
65
+ "mintSyFromTokenRevert(address,address,address,uint256)", makers[i], SY, tokens[i], amounts[i]
66
+ )
67
+ );
68
+ minted[i] = parseMinted(result);
69
+ }
70
+ }
71
+
72
+ function parseMinted(bytes memory result) internal pure returns (uint256 minted) {
73
+ if (result.length < 4) return type(uint256).max;
74
+
75
+ bytes4 top = bytes4(BytesLib.slice(result, 0, 4));
76
+ if (top == bytes4(0x1934afc8)) {
77
+ // selector of SimulationResults
78
+ (, bytes memory beta) = abi.decode(BytesLib.slice(result, 4, result.length - 4), (bool, bytes));
79
+ minted = abi.decode(beta, (uint256));
80
+ } else {
81
+ minted = type(uint256).max;
82
+ }
83
+ }
84
+
85
+ function mintSyFromTokenRevert(address maker, address SY, address token, uint256 makingAmount)
86
+ public
87
+ returns (uint256)
88
+ {
89
+ _transferIn(token, maker, makingAmount);
90
+ if (token == WNATIVE && !IStandardizedYield(SY).isValidTokenIn(WNATIVE)) {
91
+ _wrap_unwrap_ETH(WNATIVE, NATIVE, makingAmount);
92
+ token = NATIVE;
93
+ }
94
+ _safeApproveInf(token, SY);
95
+ uint256 minted = IStandardizedYield(SY).deposit{value: token == NATIVE ? makingAmount : 0}(
96
+ address(this), token, makingAmount, 0
97
+ );
98
+ revert Errors.SimulationResults(true, abi.encode(minted));
99
+ }
100
+ }
@@ -0,0 +1,41 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.0;
3
+
4
+ import "../core/libraries/Errors.sol";
5
+
6
+ contract SimulateHelper {
7
+ address private immutable original;
8
+
9
+ constructor() {
10
+ original = address(this);
11
+ }
12
+
13
+ function multicallRevert(uint256 gasLimit, address[] calldata targets, bytes[] calldata callDatas)
14
+ public
15
+ payable
16
+ virtual
17
+ returns (bytes[] memory res, uint256[] memory gasUsed)
18
+ {
19
+ require(targets.length == callDatas.length, "length mismatch");
20
+
21
+ uint256 length = callDatas.length;
22
+ res = new bytes[](length);
23
+ gasUsed = new uint256[](length);
24
+ for (uint256 i = 0; i < length;) {
25
+ uint256 gasBefore = gasleft();
26
+ (, res[i]) = original.delegatecall{gas: gasLimit}(
27
+ abi.encodeWithSignature("simulate(address,bytes)", targets[i], callDatas[i])
28
+ );
29
+ gasUsed[i] = gasBefore - gasleft();
30
+
31
+ unchecked {
32
+ ++i;
33
+ }
34
+ }
35
+ }
36
+
37
+ function simulate(address target, bytes calldata data) external payable {
38
+ (bool success, bytes memory result) = target.delegatecall(data);
39
+ revert Errors.SimulationResults(success, result);
40
+ }
41
+ }