@pendle/core-v2 6.3.0-beta → 6.3.0-sweedtest

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 (627) 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/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +2 -2
  9. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
  11. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  12. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  14. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  16. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
  18. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
  19. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  22. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  27. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  33. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  34. package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  36. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  37. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  39. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +2 -2
  42. package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +2 -2
  44. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
  48. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  52. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +2 -2
  54. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  56. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  57. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
  58. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
  60. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
  62. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
  64. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.json +2 -2
  66. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  68. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -2
  69. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  70. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
  71. package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
  72. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
  73. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
  74. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  75. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  76. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
  77. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
  78. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
  79. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +2 -2
  80. package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
  81. package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +2 -2
  82. package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
  83. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
  84. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +2 -2
  85. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  86. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  87. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  88. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  89. package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
  90. package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +1 -1
  91. package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  93. package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +4 -0
  94. package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.json +141 -0
  95. package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
  96. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
  97. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
  98. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  99. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  101. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  102. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
  103. package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
  104. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  105. package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
  107. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
  108. package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
  109. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
  112. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
  113. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
  114. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
  121. package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
  122. package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
  123. package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +1 -1
  124. package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.dbg.json +1 -1
  125. package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.json +135 -0
  126. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  127. package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
  128. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +1 -1
  129. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +1 -1
  130. package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
  131. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  132. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
  133. package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
  134. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  135. package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
  136. package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
  137. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
  138. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
  139. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +42 -0
  140. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
  141. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  142. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +13 -0
  143. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  144. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
  145. package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +1 -1
  146. package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
  147. package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
  148. package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
  149. package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
  150. package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
  151. package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
  152. package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +1 -1
  153. package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
  154. package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
  155. package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
  156. package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
  157. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  158. package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
  159. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  160. package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.dbg.json +1 -1
  161. package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
  162. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  163. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  164. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  165. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  166. package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
  167. package/build/artifacts/contracts/interfaces/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
  168. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  169. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  170. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  171. package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
  172. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
  173. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
  174. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
  175. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  176. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
  177. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
  178. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
  179. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +2 -2
  180. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
  181. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
  182. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
  183. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
  184. package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
  185. package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.json +2 -2
  186. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  187. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
  188. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  189. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  190. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
  191. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +2 -2
  192. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
  193. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +2 -2
  194. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
  195. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
  196. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
  197. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.json +2 -2
  198. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
  199. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
  200. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
  201. package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +4 -0
  202. package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +314 -0
  203. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
  204. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
  205. package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
  206. package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
  207. package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +4 -0
  208. package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +326 -0
  209. package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
  210. package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
  211. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
  212. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
  213. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
  214. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
  215. package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
  216. package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.json +2 -2
  217. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
  218. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
  219. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
  220. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
  221. package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
  222. package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
  223. package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
  224. package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
  225. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
  226. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
  227. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
  228. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
  229. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
  230. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
  231. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
  232. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +2 -2
  233. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
  234. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
  235. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
  236. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
  237. package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
  238. package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.json +2 -2
  239. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
  240. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -2
  241. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  242. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
  243. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  244. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
  245. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  246. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
  247. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  248. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
  249. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  250. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
  251. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  252. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
  253. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  254. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
  255. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
  256. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
  257. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
  258. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
  259. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  260. package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +1 -1
  261. package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.json +13 -13
  262. package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.dbg.json +1 -1
  263. package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.json +150 -12
  264. package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
  265. package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.json +2 -2
  266. package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
  267. package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.json +2 -2
  268. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  269. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
  270. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
  271. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.json +2 -2
  272. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
  273. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.json +2 -2
  274. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
  275. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.json +2 -2
  276. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
  277. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.json +2 -2
  278. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
  279. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.json +2 -2
  280. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  281. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
  282. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +2 -2
  283. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
  284. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +2 -2
  285. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  286. package/build/artifacts/contracts/oracles/StatelessWrapper/PendleLinearDiscountOracleWrapper.sol/PendleLinearDiscountOracleWrapper.dbg.json +1 -1
  287. package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.dbg.json +1 -1
  288. package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.json +2 -2
  289. package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
  290. package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
  291. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +1 -1
  292. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +1 -1
  293. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +1 -1
  294. package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
  295. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
  296. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
  297. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
  298. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.json +2 -2
  299. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
  300. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
  301. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
  302. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
  303. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
  304. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
  305. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
  306. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
  307. package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
  308. package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
  309. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
  310. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
  311. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
  312. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
  313. package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
  314. package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
  315. package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
  316. package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
  317. package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
  318. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  319. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
  320. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
  321. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  322. package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
  323. package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
  324. package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
  325. package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
  326. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
  327. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
  328. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
  329. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
  330. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
  331. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
  332. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
  333. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
  334. package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
  335. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
  336. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.json +171 -0
  337. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
  338. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
  339. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
  340. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.json +2 -2
  341. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
  342. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
  343. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  344. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  345. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +15 -17
  346. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +1 -1
  347. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +14 -16
  348. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +2 -3
  349. package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +9 -12
  350. package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +12 -12
  351. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -10
  352. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -12
  353. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +4 -11
  354. package/contracts/LiquidityMining/PendleMerkleDistributor.sol +11 -13
  355. package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +17 -22
  356. package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +21 -28
  357. package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +31 -27
  358. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +19 -23
  359. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +7 -8
  360. package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +6 -5
  361. package/contracts/core/Market/MarketMathCore.sol +78 -112
  362. package/contracts/core/Market/OracleLib.sol +34 -41
  363. package/contracts/core/Market/PendleGauge.sol +8 -8
  364. package/contracts/core/Market/PendleMarketFactoryV6Upg.sol +19 -16
  365. package/contracts/core/Market/PendleMarketV6.sol +63 -65
  366. package/contracts/core/RewardManager/RewardManager.sol +8 -8
  367. package/contracts/core/RewardManager/RewardManagerAbstract.sol +6 -5
  368. package/contracts/core/StandardizedYield/PYIndex.sol +2 -2
  369. package/contracts/core/YieldContracts/InterestManagerYT.sol +8 -9
  370. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +4 -8
  371. package/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol +15 -12
  372. package/contracts/core/YieldContracts/PendleYieldToken.sol +54 -41
  373. package/contracts/core/erc20/PendleERC20.sol +9 -6
  374. package/contracts/core/libraries/ArrayLib.sol +11 -13
  375. package/contracts/core/libraries/BaseSplitCodeFactory.sol +22 -29
  376. package/contracts/core/libraries/BoringOwnableUpgradeableV2.sol +2 -1
  377. package/contracts/core/libraries/Errors.sol +2 -4
  378. package/contracts/core/libraries/ExpiryUtilsLib.sol +10 -10
  379. package/contracts/core/libraries/StringLib.sol +13 -13
  380. package/contracts/core/libraries/TokenHelper.sol +3 -3
  381. package/contracts/core/libraries/math/LogExpMath.sol +77 -67
  382. package/contracts/cross-chain/FixedPricePTAMM.sol +38 -39
  383. package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +1 -1
  384. package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +1 -1
  385. package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +15 -12
  386. package/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol +21 -24
  387. package/contracts/interfaces/ILayerZeroEndpoint.sol +5 -3
  388. package/contracts/interfaces/IMarketSweed.sol +23 -0
  389. package/contracts/interfaces/IPActionCallbackV3.sol +1 -1
  390. package/contracts/interfaces/IPActionInfoStatic.sol +1 -3
  391. package/contracts/interfaces/IPActionMarketAuxStatic.sol +11 -15
  392. package/contracts/interfaces/IPActionMarketCoreStatic.sol +58 -109
  393. package/contracts/interfaces/IPActionMintRedeemStatic.sol +21 -26
  394. package/contracts/interfaces/IPActionMiscV3.sol +24 -44
  395. package/contracts/interfaces/IPActionSimple.sol +24 -43
  396. package/contracts/interfaces/IPActionVePendleStatic.sol +4 -5
  397. package/contracts/interfaces/IPAllActionTypeV3.sol +14 -16
  398. package/contracts/interfaces/IPAllActionV3.sol +4 -4
  399. package/contracts/interfaces/IPAllEventsV3.sol +5 -21
  400. package/contracts/interfaces/IPBridgedPrincipalToken.sol +2 -2
  401. package/contracts/interfaces/IPCommonSYFactory.sol +3 -6
  402. package/contracts/interfaces/IPExchangeRateOracleApp.sol +44 -17
  403. package/contracts/interfaces/IPFeeDistributorV2.sol +13 -16
  404. package/contracts/interfaces/IPFixedPricePTAMM.sol +22 -34
  405. package/contracts/interfaces/IPGovernanceProxy.sol +2 -6
  406. package/contracts/interfaces/IPInterestManagerYTV2.sol +4 -3
  407. package/contracts/interfaces/IPLimitRouter.sol +16 -16
  408. package/contracts/interfaces/IPMarket.sol +25 -35
  409. package/contracts/interfaces/IPMarketFactory.sol +9 -16
  410. package/contracts/interfaces/IPMerkleDistributor.sol +6 -10
  411. package/contracts/interfaces/IPMsgSendEndpoint.sol +7 -12
  412. package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +6 -12
  413. package/contracts/interfaces/IPPYLpOracle.sol +1 -4
  414. package/contracts/interfaces/IPRouterStatic.sol +3 -3
  415. package/contracts/interfaces/IPVotingController.sol +4 -4
  416. package/contracts/interfaces/IPVotingEscrowMainchain.sol +1 -1
  417. package/contracts/interfaces/IPYieldContractFactory.sol +3 -5
  418. package/contracts/interfaces/IPYieldToken.sol +8 -11
  419. package/contracts/interfaces/IPYieldTokenV2.sol +8 -11
  420. package/contracts/interfaces/IStandardizedYield.sol +16 -17
  421. package/contracts/limit/LimitMathCore.sol +38 -56
  422. package/contracts/limit/LimitRouterBase.sol +66 -88
  423. package/contracts/limit/PendleLimitRouter.sol +11 -7
  424. package/contracts/offchain-helpers/AddressProvider.sol +1 -1
  425. package/contracts/offchain-helpers/AutomateReady.sol +2 -2
  426. package/contracts/offchain-helpers/BalanceReader.sol +21 -9
  427. package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +5 -7
  428. package/contracts/offchain-helpers/Broadcaster.sol +3 -3
  429. package/contracts/offchain-helpers/BytesLib.sol +3 -5
  430. package/contracts/offchain-helpers/EmptyUUPS.sol +2 -2
  431. package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +5 -8
  432. package/contracts/offchain-helpers/LegacyNFTHelper.sol +1 -5
  433. package/contracts/offchain-helpers/LimitBackendHelperV2.sol +12 -12
  434. package/contracts/offchain-helpers/MarketSweed.sol +246 -0
  435. package/contracts/offchain-helpers/Multicall2.sol +9 -7
  436. package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +4 -8
  437. package/contracts/offchain-helpers/PendleFeeSetter.sol +149 -0
  438. package/contracts/offchain-helpers/PendleGovernanceProxy.sol +7 -10
  439. package/contracts/offchain-helpers/PendleLPWrapper.sol +12 -3
  440. package/contracts/offchain-helpers/PendleLPWrapperFactory.sol +2 -2
  441. package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
  442. package/contracts/offchain-helpers/PendleMulticallV2.sol +13 -12
  443. package/contracts/offchain-helpers/PendleOffchainStorage.sol +1 -1
  444. package/contracts/offchain-helpers/PendleWstETHPriceFeed.sol +4 -2
  445. package/contracts/offchain-helpers/SimulateHelper.sol +7 -6
  446. package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +13 -32
  447. package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +7 -11
  448. package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +16 -35
  449. package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +15 -35
  450. package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +12 -13
  451. package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +1 -4
  452. package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
  453. package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +12 -9
  454. package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +60 -91
  455. package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +103 -190
  456. package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +26 -26
  457. package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +3 -3
  458. package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +8 -10
  459. package/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol +100 -40
  460. package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +18 -9
  461. package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +118 -52
  462. package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +2 -3
  463. package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +12 -12
  464. package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +17 -20
  465. package/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol +15 -19
  466. package/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol +7 -6
  467. package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol +13 -9
  468. package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol +20 -21
  469. package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol +4 -7
  470. package/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol +2 -2
  471. package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol +13 -10
  472. package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol +13 -10
  473. package/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol +6 -5
  474. package/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol +1 -1
  475. package/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol +3 -3
  476. package/contracts/router/ActionAddRemoveLiqV3.sol +55 -150
  477. package/contracts/router/ActionCallbackV3.sol +20 -13
  478. package/contracts/router/ActionMiscV3.sol +54 -78
  479. package/contracts/router/ActionSimple.sol +76 -128
  480. package/contracts/router/ActionSwapPTV3.sol +7 -19
  481. package/contracts/router/ActionSwapYTV3.sol +8 -20
  482. package/contracts/router/PendleRouterV4.sol +1 -1
  483. package/contracts/router/Reflector.sol +15 -21
  484. package/contracts/router/base/ActionBase.sol +61 -105
  485. package/contracts/router/base/ActionDelegateBase.sol +39 -38
  486. package/contracts/router/base/CallbackHelper.sol +21 -19
  487. package/contracts/router/math/ApproxStateLib.sol +28 -28
  488. package/contracts/router/math/MarketApproxEstimateLib.sol +11 -13
  489. package/contracts/router/math/MarketApproxLibOnchain.sol +47 -24
  490. package/contracts/router/math/MarketApproxLibV2.sol +63 -44
  491. package/contracts/router/swap-aggregator/OKXScaleHelper.sol +191 -55
  492. package/contracts/router/swap-aggregator/ParaswapScaleHelper.sol +34 -48
  493. package/contracts/router/swap-aggregator/PendleSwap.sol +26 -28
  494. package/deployments/1-core.json +5 -2
  495. package/deployments/1-offchain-helper.json +2 -1
  496. package/deployments/10-core.json +5 -2
  497. package/deployments/10-offchain-helper.json +2 -1
  498. package/deployments/146-core.json +5 -2
  499. package/deployments/146-offchain-helper.json +2 -1
  500. package/deployments/42161-core.json +7 -3
  501. package/deployments/42161-offchain-helper.json +2 -1
  502. package/deployments/5000-core.json +5 -2
  503. package/deployments/5000-offchain-helper.json +2 -1
  504. package/deployments/56-core.json +5 -2
  505. package/deployments/56-offchain-helper.json +2 -1
  506. package/deployments/80094-core.json +5 -2
  507. package/deployments/80094-offchain-helper.json +2 -1
  508. package/deployments/8453-core.json +5 -2
  509. package/deployments/8453-offchain-helper.json +2 -1
  510. package/deployments/9745-core.json +5 -2
  511. package/deployments/9745-offchain-helper.json +2 -1
  512. package/deployments/999-core.json +5 -2
  513. package/deployments/999-offchain-helper.json +2 -1
  514. package/package.json +4 -6
  515. package/typechain-types/IMarketSweed.ts +203 -0
  516. package/typechain-types/IOKXDexRouter.ts +99 -0
  517. package/typechain-types/IPExchangeRateOracleApp.ts +83 -0
  518. package/typechain-types/IPLimitRouter.ts +69 -0
  519. package/typechain-types/IPMarket.ts +13 -0
  520. package/typechain-types/LimitMathCore.ts +102 -0
  521. package/typechain-types/MarketSweed.ts +242 -0
  522. package/typechain-types/OverfillMathLib.ts +81 -0
  523. package/typechain-types/PendleCrossChainOracleBaseApp_Init.ts +13 -19
  524. package/typechain-types/PendleExchangeRateOracleApp.ts +73 -9
  525. package/typechain-types/PendleFeeSetter.ts +188 -3
  526. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
  527. package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
  528. package/typechain-types/factories/ActionDelegateBase__factory.ts +1 -1
  529. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  530. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  531. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  532. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  533. package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
  534. package/typechain-types/factories/ActionSimple__factory.ts +1 -1
  535. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  536. package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
  537. package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
  538. package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
  539. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  540. package/typechain-types/factories/AddressProvider__factory.ts +1 -1
  541. package/typechain-types/factories/BalanceReader__factory.ts +1 -1
  542. package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
  543. package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
  544. package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
  545. package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
  546. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  547. package/typechain-types/factories/EmptyUUPS__factory.ts +1 -1
  548. package/typechain-types/factories/Errors__factory.ts +17 -1
  549. package/typechain-types/factories/ExchangeRateMsgCodec__factory.ts +1 -1
  550. package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
  551. package/typechain-types/factories/FixedPricePTAMM__factory.ts +1 -1
  552. package/typechain-types/factories/{IPActionCrossChain__factory.ts → IMarketSweed__factory.ts} +61 -22
  553. package/typechain-types/factories/IOKXDexRouter__factory.ts +171 -0
  554. package/typechain-types/factories/IPExchangeRateOracleApp__factory.ts +135 -0
  555. package/typechain-types/factories/IPLimitRouter__factory.ts +42 -0
  556. package/typechain-types/factories/IPMarket__factory.ts +13 -0
  557. package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
  558. package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
  559. package/typechain-types/factories/LimitMathCore__factory.ts +87 -0
  560. package/typechain-types/factories/MarketSweed__factory.ts +364 -0
  561. package/typechain-types/factories/Multicall2__factory.ts +1 -1
  562. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  563. package/typechain-types/factories/OverfillMathLib__factory.ts +77 -0
  564. package/typechain-types/factories/PendleBridgedPrincipalToken__factory.ts +1 -1
  565. package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +1 -1
  566. package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +1 -1
  567. package/typechain-types/factories/PendleChainlinkOracle__factory.ts +1 -1
  568. package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
  569. package/typechain-types/factories/PendleCommonSYFactory__factory.ts +1 -1
  570. package/typechain-types/factories/PendleCrossChainOracleBaseApp_Init__factory.ts +13 -13
  571. package/typechain-types/factories/PendleERC20__factory.ts +1 -1
  572. package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +150 -19
  573. package/typechain-types/factories/PendleExchangeRateOracleV2__factory.ts +1 -1
  574. package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +1 -1
  575. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  576. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  577. package/typechain-types/factories/PendleFeeSetter__factory.ts +140 -2
  578. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  579. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  580. package/typechain-types/factories/PendleGovernanceProxy__factory.ts +1 -1
  581. package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
  582. package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
  583. package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
  584. package/typechain-types/factories/PendleMarketFactoryV6Upg__factory.ts +1 -1
  585. package/typechain-types/factories/PendleMarketV6__factory.ts +1 -1
  586. package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
  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/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
  590. package/typechain-types/factories/PendleMulticallOwnerV1__factory.ts +1 -1
  591. package/typechain-types/factories/PendleMulticallV1__factory.ts +1 -1
  592. package/typechain-types/factories/PendleMulticallV2__factory.ts +1 -1
  593. package/typechain-types/factories/PendleOffchainStorage__factory.ts +1 -1
  594. package/typechain-types/factories/PendlePTOFTAdapterFactory__factory.ts +1 -1
  595. package/typechain-types/factories/PendlePYLpOracle__factory.ts +1 -1
  596. package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
  597. package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
  598. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  599. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  600. package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
  601. package/typechain-types/factories/PendleSparkLinearDiscountOracleFactoryWrapper__factory.ts +1 -1
  602. package/typechain-types/factories/PendleSparkLinearDiscountOracleFactory__factory.ts +1 -1
  603. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  604. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  605. package/typechain-types/factories/PendleWstETHPriceFeed__factory.ts +1 -1
  606. package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +1 -1
  607. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  608. package/typechain-types/factories/Reflector__factory.ts +1 -1
  609. package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -1
  610. package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
  611. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  612. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  613. package/typechain-types/hardhat.d.ts +27 -0
  614. package/typechain-types/index.ts +6 -0
  615. package/typechain-types/ActionCrossChain.ts +0 -161
  616. package/typechain-types/BasePendleBridgedPrincipalToken.ts +0 -1689
  617. package/typechain-types/IPActionCrossChain.ts +0 -161
  618. package/typechain-types/LimitBackendHelper.ts +0 -287
  619. package/typechain-types/PendleBridgedPrincipalToken_18Decimals.ts +0 -1689
  620. package/typechain-types/PendleBridgedPrincipalToken_6Decimals.ts +0 -1689
  621. package/typechain-types/PendleBridgedPrincipalToken_8Decimals.ts +0 -1689
  622. package/typechain-types/factories/ActionCrossChain__factory.ts +0 -152
  623. package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +0 -1548
  624. package/typechain-types/factories/LimitBackendHelper__factory.ts +0 -232
  625. package/typechain-types/factories/PendleBridgedPrincipalToken_18Decimals__factory.ts +0 -1652
  626. package/typechain-types/factories/PendleBridgedPrincipalToken_6Decimals__factory.ts +0 -1650
  627. package/typechain-types/factories/PendleBridgedPrincipalToken_8Decimals__factory.ts +0 -1650
@@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
4
4
  library ArrayLib {
5
5
  function sum(uint256[] memory input) internal pure returns (uint256) {
6
6
  uint256 value = 0;
7
- for (uint256 i = 0; i < input.length; ) {
7
+ for (uint256 i = 0; i < input.length;) {
8
8
  value += input[i];
9
9
  unchecked {
10
10
  i++;
@@ -16,7 +16,7 @@ library ArrayLib {
16
16
  /// @notice return index of the element if found, else return uint256.max
17
17
  function find(address[] memory array, address element) internal pure returns (uint256 index) {
18
18
  uint256 length = array.length;
19
- for (uint256 i = 0; i < length; ) {
19
+ for (uint256 i = 0; i < length;) {
20
20
  if (array[i] == element) return i;
21
21
  unchecked {
22
22
  i++;
@@ -28,7 +28,7 @@ library ArrayLib {
28
28
  function append(address[] memory inp, address element) internal pure returns (address[] memory out) {
29
29
  uint256 length = inp.length;
30
30
  out = new address[](length + 1);
31
- for (uint256 i = 0; i < length; ) {
31
+ for (uint256 i = 0; i < length;) {
32
32
  out[i] = inp[i];
33
33
  unchecked {
34
34
  i++;
@@ -41,7 +41,7 @@ library ArrayLib {
41
41
  uint256 length = inp.length;
42
42
  out = new address[](length + 1);
43
43
  out[0] = element;
44
- for (uint256 i = 1; i <= length; ) {
44
+ for (uint256 i = 1; i <= length;) {
45
45
  out[i] = inp[i - 1];
46
46
  unchecked {
47
47
  i++;
@@ -82,7 +82,7 @@ library ArrayLib {
82
82
  // various version of contains
83
83
  function contains(address[] memory array, address element) internal pure returns (bool) {
84
84
  uint256 length = array.length;
85
- for (uint256 i = 0; i < length; ) {
85
+ for (uint256 i = 0; i < length;) {
86
86
  if (array[i] == element) return true;
87
87
  unchecked {
88
88
  i++;
@@ -93,7 +93,7 @@ library ArrayLib {
93
93
 
94
94
  function contains(bytes4[] memory array, bytes4 element) internal pure returns (bool) {
95
95
  uint256 length = array.length;
96
- for (uint256 i = 0; i < length; ) {
96
+ for (uint256 i = 0; i < length;) {
97
97
  if (array[i] == element) return true;
98
98
  unchecked {
99
99
  i++;
@@ -128,13 +128,11 @@ library ArrayLib {
128
128
  res[3] = d;
129
129
  }
130
130
 
131
- function create(
132
- address a,
133
- address b,
134
- address c,
135
- address d,
136
- address e
137
- ) internal pure returns (address[] memory res) {
131
+ function create(address a, address b, address c, address d, address e)
132
+ internal
133
+ pure
134
+ returns (address[] memory res)
135
+ {
138
136
  res = new address[](5);
139
137
  res[0] = a;
140
138
  res[1] = b;
@@ -87,9 +87,7 @@ library CodeDeployer {
87
87
  }
88
88
 
89
89
  library BaseSplitCodeFactory {
90
- function setCreationCode(
91
- bytes memory creationCode
92
- )
90
+ function setCreationCode(bytes memory creationCode)
93
91
  internal
94
92
  returns (
95
93
  address creationCodeContractA,
@@ -104,8 +102,8 @@ library BaseSplitCodeFactory {
104
102
 
105
103
  // We are going to deploy two contracts: one with approximately the first half of `creationCode`'s contents
106
104
  // (A), and another with the remaining half (B).
107
- // We store the lengths in both immutable and stack variables, since immutable variables cannot be read during
108
- // construction.
105
+ // We store the lengths in both immutable and stack variables, since immutable variables cannot be read
106
+ // during construction.
109
107
  creationCodeSizeA = creationCodeSize / 2;
110
108
 
111
109
  creationCodeSizeB = creationCodeSize - creationCodeSizeA;
@@ -116,8 +114,8 @@ library BaseSplitCodeFactory {
116
114
 
117
115
  // Memory: [ code length ] [ A.data ] [ B.data ]
118
116
 
119
- // Creating A's array is simple: we simply replace `creationCode`'s length with A's length. We'll later restore
120
- // the original length.
117
+ // Creating A's array is simple: we simply replace `creationCode`'s length with A's length. We'll later
118
+ // restore the original length.
121
119
 
122
120
  bytes memory creationCodeA;
123
121
  assembly {
@@ -130,8 +128,9 @@ library BaseSplitCodeFactory {
130
128
 
131
129
  creationCodeContractA = CodeDeployer.deploy(creationCodeA);
132
130
 
133
- // Creating B's array is a bit more involved: since we cannot move B's contents, we are going to create a 'new'
134
- // memory array starting at A's last 32 bytes, which will be replaced with B's length. We'll back-up this last
131
+ // Creating B's array is a bit more involved: since we cannot move B's contents, we are going to create a
132
+ // 'new' memory array starting at A's last 32 bytes, which will be replaced with B's length. We'll back-up
133
+ // this last
135
134
  // byte to later restore it.
136
135
 
137
136
  bytes memory creationCodeB;
@@ -150,7 +149,8 @@ library BaseSplitCodeFactory {
150
149
 
151
150
  creationCodeContractB = CodeDeployer.deploy(creationCodeB);
152
151
 
153
- // We now restore the original contents of `creationCode` by writing back the original length and A's last byte.
152
+ // We now restore the original contents of `creationCode` by writing back the original length and A's last
153
+ // byte.
154
154
  assembly {
155
155
  mstore(creationCodeA, creationCodeSize)
156
156
  mstore(creationCodeB, lastByteA)
@@ -167,14 +167,9 @@ library BaseSplitCodeFactory {
167
167
  address creationCodeContractB,
168
168
  uint256 creationCodeSizeB
169
169
  ) internal view returns (bytes memory) {
170
- return
171
- _getCreationCodeWithArgs(
172
- "",
173
- creationCodeContractA,
174
- creationCodeSizeA,
175
- creationCodeContractB,
176
- creationCodeSizeB
177
- );
170
+ return _getCreationCodeWithArgs(
171
+ "", creationCodeContractA, creationCodeSizeA, creationCodeContractB, creationCodeSizeB
172
+ );
178
173
  }
179
174
 
180
175
  /**
@@ -188,10 +183,11 @@ library BaseSplitCodeFactory {
188
183
  uint256 creationCodeSizeB
189
184
  ) private view returns (bytes memory code) {
190
185
  unchecked {
191
- // This function exists because `abi.encode()` cannot be instructed to place its result at a specific address.
192
- // We need for the ABI-encoded constructor arguments to be located immediately after the creation code, but
193
- // cannot rely on `abi.encodePacked()` to perform concatenation as that would involve copying the creation code,
194
- // which would be prohibitively expensive.
186
+ // This function exists because `abi.encode()` cannot be instructed to place its result at a specific
187
+ // address. We need for the ABI-encoded constructor arguments to be located immediately after the creation
188
+ // code, but
189
+ // cannot rely on `abi.encodePacked()` to perform concatenation as that would involve copying the creation
190
+ // code, which would be prohibitively expensive.
195
191
  // Instead, we compute the creation code in a pre-allocated array that is large enough to hold *both* the
196
192
  // creation code and the constructor arguments, and then copy the ABI-encoded arguments (which should not be
197
193
  // overly long) right after the end of the creation code.
@@ -204,8 +200,9 @@ library BaseSplitCodeFactory {
204
200
  uint256 codeSize = creationCodeSize + constructorArgsSize;
205
201
 
206
202
  assembly {
207
- // First, we allocate memory for `code` by retrieving the free memory pointer and then moving it ahead of
208
- // `code` by the size of the creation code plus constructor arguments, and 32 bytes for the array length.
203
+ // First, we allocate memory for `code` by retrieving the free memory pointer and then moving it ahead
204
+ // of `code` by the size of the creation code plus constructor arguments, and 32 bytes for the array
205
+ // length.
209
206
  code := mload(0x40)
210
207
  mstore(0x40, add(code, add(codeSize, 32)))
211
208
 
@@ -246,11 +243,7 @@ library BaseSplitCodeFactory {
246
243
  ) internal returns (address) {
247
244
  unchecked {
248
245
  bytes memory creationCode = _getCreationCodeWithArgs(
249
- constructorArgs,
250
- creationCodeContractA,
251
- creationCodeSizeA,
252
- creationCodeContractB,
253
- creationCodeSizeB
246
+ constructorArgs, creationCodeContractA, creationCodeSizeA, creationCodeContractB, creationCodeSizeB
254
247
  );
255
248
  return Create2.deploy(amount, salt, creationCode);
256
249
  }
@@ -19,7 +19,8 @@ abstract contract BoringOwnableUpgradeableV2 is BoringOwnableUpgradeableData, In
19
19
  /// Can only be invoked by the current `owner`.
20
20
  /// @param newOwner Address of the new owner.
21
21
  /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`.
22
- /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise.
22
+ /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect
23
+ /// otherwise.
23
24
  function transferOwnership(address newOwner, bool direct, bool renounce) public onlyOwner {
24
25
  if (direct) {
25
26
  // Checks
@@ -19,10 +19,7 @@ library Errors {
19
19
  error ApproxFail();
20
20
  error ApproxParamsInvalid(uint256 guessMin, uint256 guessMax, uint256 eps);
21
21
  error ApproxBinarySearchInputInvalid(
22
- uint256 approxGuessMin,
23
- uint256 approxGuessMax,
24
- uint256 minGuessMin,
25
- uint256 maxGuessMax
22
+ uint256 approxGuessMin, uint256 approxGuessMax, uint256 minGuessMin, uint256 maxGuessMax
26
23
  );
27
24
 
28
25
  // MARKET + MARKET MATH CORE
@@ -187,4 +184,5 @@ library Errors {
187
184
  error ExchangeRateCallFailed();
188
185
  error InvalidDestinationEid();
189
186
  error InvalidMsgType();
187
+ error NotEnoughNativeFee(uint256 msgValue, uint256 totalFee);
190
188
  }
@@ -8,9 +8,9 @@ library ExpiryUtils {
8
8
  uint8 day;
9
9
  }
10
10
 
11
- uint256 private constant DAY_IN_SECONDS = 86400;
12
- uint256 private constant YEAR_IN_SECONDS = 31536000;
13
- uint256 private constant LEAP_YEAR_IN_SECONDS = 31622400;
11
+ uint256 private constant DAY_IN_SECONDS = 86_400;
12
+ uint256 private constant YEAR_IN_SECONDS = 31_536_000;
13
+ uint256 private constant LEAP_YEAR_IN_SECONDS = 31_622_400;
14
14
  uint16 private constant ORIGIN_YEAR = 1970;
15
15
 
16
16
  /**
@@ -21,13 +21,13 @@ library ExpiryUtils {
21
21
  * @param _expiry The expiry in epoch time.
22
22
  * @param _delimiter Can be any delimiter, but usually "-" or " ".
23
23
  * @return result Returns the concatenated string.
24
- **/
25
- function concat(
26
- string memory _bt,
27
- string memory _yt,
28
- uint256 _expiry,
29
- string memory _delimiter
30
- ) internal pure returns (string memory result) {
24
+ *
25
+ */
26
+ function concat(string memory _bt, string memory _yt, uint256 _expiry, string memory _delimiter)
27
+ internal
28
+ pure
29
+ returns (string memory result)
30
+ {
31
31
  result = string(abi.encodePacked(_bt, _delimiter, _yt, _delimiter, toRFC2822String(_expiry)));
32
32
  }
33
33
 
@@ -471,12 +471,11 @@ library StringLib {
471
471
 
472
472
  // Returns the memory address of the first byte of the first occurrence of
473
473
  // `needle` in `self`, or the first byte after `self` if not found.
474
- function findPtr(
475
- uint256 selflen,
476
- uint256 selfptr,
477
- uint256 needlelen,
478
- uint256 needleptr
479
- ) private pure returns (uint256) {
474
+ function findPtr(uint256 selflen, uint256 selfptr, uint256 needlelen, uint256 needleptr)
475
+ private
476
+ pure
477
+ returns (uint256)
478
+ {
480
479
  uint256 ptr = selfptr;
481
480
  uint256 idx;
482
481
 
@@ -528,12 +527,11 @@ library StringLib {
528
527
 
529
528
  // Returns the memory address of the first byte after the last occurrence of
530
529
  // `needle` in `self`, or the address of `self` if not found.
531
- function rfindPtr(
532
- uint256 selflen,
533
- uint256 selfptr,
534
- uint256 needlelen,
535
- uint256 needleptr
536
- ) private pure returns (uint256) {
530
+ function rfindPtr(uint256 selflen, uint256 selfptr, uint256 needlelen, uint256 needleptr)
531
+ private
532
+ pure
533
+ returns (uint256)
534
+ {
537
535
  uint256 ptr;
538
536
 
539
537
  if (needlelen <= selflen) {
@@ -738,7 +736,9 @@ library StringLib {
738
736
  if (parts.length == 0) return "";
739
737
 
740
738
  uint256 length = self._len * (parts.length - 1);
741
- for (uint256 i = 0; i < parts.length; i++) length += parts[i]._len;
739
+ for (uint256 i = 0; i < parts.length; i++) {
740
+ length += parts[i]._len;
741
+ }
742
742
 
743
743
  string memory ret = new string(length);
744
744
  uint256 retptr;
@@ -1,9 +1,9 @@
1
1
  // SPDX-License-Identifier: GPL-3.0-or-later
2
2
  pragma solidity ^0.8.0;
3
3
 
4
+ import "../../interfaces/IWETH.sol";
4
5
  import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
6
  import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
6
- import "../../interfaces/IWETH.sol";
7
7
 
8
8
  abstract contract TokenHelper {
9
9
  using SafeERC20 for IERC20;
@@ -23,7 +23,7 @@ abstract contract TokenHelper {
23
23
  function _transferOut(address token, address to, uint256 amount) internal {
24
24
  if (amount == 0) return;
25
25
  if (token == NATIVE) {
26
- (bool success, ) = to.call{value: amount}("");
26
+ (bool success,) = to.call{value: amount}("");
27
27
  require(success, "eth send failed");
28
28
  } else {
29
29
  IERC20(token).safeTransfer(to, amount);
@@ -33,7 +33,7 @@ abstract contract TokenHelper {
33
33
  function _transferOut(address[] memory tokens, address to, uint256[] memory amounts) internal {
34
34
  uint256 numTokens = tokens.length;
35
35
  require(numTokens == amounts.length, "length mismatch");
36
- for (uint256 i = 0; i < numTokens; ) {
36
+ for (uint256 i = 0; i < numTokens;) {
37
37
  _transferOut(tokens[i], to, amounts[i]);
38
38
  unchecked {
39
39
  i++;
@@ -1,13 +1,15 @@
1
1
  // SPDX-License-Identifier: GPL-3.0-or-later
2
2
  // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3
- // documentation files (the “Software”), to deal in the Software without restriction, including without limitation the
3
+ // documentation files (the “Software”), to deal in the Software without restriction, including without limitation
4
+ // the
4
5
  // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
5
6
  // permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
7
 
7
8
  // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
8
9
  // Software.
9
10
 
10
- // THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
11
+ // THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
12
+ // THE
11
13
  // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
12
14
  // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
13
15
  // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -56,32 +58,33 @@ library LogExpMath {
56
58
  uint256 constant MILD_EXPONENT_BOUND = 2 ** 254 / uint256(ONE_20);
57
59
 
58
60
  // 18 decimal constants
59
- int256 constant x0 = 128000000000000000000; // 2ˆ7
60
- int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // eˆ(x0) (no decimals)
61
- int256 constant x1 = 64000000000000000000; // 2ˆ6
62
- int256 constant a1 = 6235149080811616882910000000; // eˆ(x1) (no decimals)
61
+ int256 constant x0 = 128_000_000_000_000_000_000; // 2ˆ7
62
+ int256 constant a0 = 38_877_084_059_945_950_922_200_000_000_000_000_000_000_000_000_000_000_000; // eˆ(x0) (no
63
+ // decimals)
64
+ int256 constant x1 = 64_000_000_000_000_000_000; // 2ˆ6
65
+ int256 constant a1 = 6_235_149_080_811_616_882_910_000_000; // eˆ(x1) (no decimals)
63
66
 
64
67
  // 20 decimal constants
65
- int256 constant x2 = 3200000000000000000000; // 2ˆ5
66
- int256 constant a2 = 7896296018268069516100000000000000; // eˆ(x2)
67
- int256 constant x3 = 1600000000000000000000; // 2ˆ4
68
- int256 constant a3 = 888611052050787263676000000; // eˆ(x3)
69
- int256 constant x4 = 800000000000000000000; // 2ˆ3
70
- int256 constant a4 = 298095798704172827474000; // eˆ(x4)
71
- int256 constant x5 = 400000000000000000000; // 2ˆ2
72
- int256 constant a5 = 5459815003314423907810; // eˆ(x5)
73
- int256 constant x6 = 200000000000000000000; // 2ˆ1
74
- int256 constant a6 = 738905609893065022723; // eˆ(x6)
75
- int256 constant x7 = 100000000000000000000; // 2ˆ0
76
- int256 constant a7 = 271828182845904523536; // eˆ(x7)
77
- int256 constant x8 = 50000000000000000000; // 2ˆ-1
78
- int256 constant a8 = 164872127070012814685; // eˆ(x8)
79
- int256 constant x9 = 25000000000000000000; // 2ˆ-2
80
- int256 constant a9 = 128402541668774148407; // eˆ(x9)
81
- int256 constant x10 = 12500000000000000000; // 2ˆ-3
82
- int256 constant a10 = 113314845306682631683; // eˆ(x10)
83
- int256 constant x11 = 6250000000000000000; // 2ˆ-4
84
- int256 constant a11 = 106449445891785942956; // eˆ(x11)
68
+ int256 constant x2 = 3_200_000_000_000_000_000_000; // 2ˆ5
69
+ int256 constant a2 = 7_896_296_018_268_069_516_100_000_000_000_000; // eˆ(x2)
70
+ int256 constant x3 = 1_600_000_000_000_000_000_000; // 2ˆ4
71
+ int256 constant a3 = 888_611_052_050_787_263_676_000_000; // eˆ(x3)
72
+ int256 constant x4 = 800_000_000_000_000_000_000; // 2ˆ3
73
+ int256 constant a4 = 298_095_798_704_172_827_474_000; // eˆ(x4)
74
+ int256 constant x5 = 400_000_000_000_000_000_000; // 2ˆ2
75
+ int256 constant a5 = 5_459_815_003_314_423_907_810; // eˆ(x5)
76
+ int256 constant x6 = 200_000_000_000_000_000_000; // 2ˆ1
77
+ int256 constant a6 = 738_905_609_893_065_022_723; // eˆ(x6)
78
+ int256 constant x7 = 100_000_000_000_000_000_000; // 2ˆ0
79
+ int256 constant a7 = 271_828_182_845_904_523_536; // eˆ(x7)
80
+ int256 constant x8 = 50_000_000_000_000_000_000; // 2ˆ-1
81
+ int256 constant a8 = 164_872_127_070_012_814_685; // eˆ(x8)
82
+ int256 constant x9 = 25_000_000_000_000_000_000; // 2ˆ-2
83
+ int256 constant a9 = 128_402_541_668_774_148_407; // eˆ(x9)
84
+ int256 constant x10 = 12_500_000_000_000_000_000; // 2ˆ-3
85
+ int256 constant a10 = 113_314_845_306_682_631_683; // eˆ(x10)
86
+ int256 constant x11 = 6_250_000_000_000_000_000; // 2ˆ-4
87
+ int256 constant a11 = 106_449_445_891_785_942_956; // eˆ(x11)
85
88
 
86
89
  /**
87
90
  * @dev Natural exponentiation (e^x) with signed 18 decimal fixed point exponent.
@@ -93,28 +96,29 @@ library LogExpMath {
93
96
  require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, "Invalid exponent");
94
97
 
95
98
  if (x < 0) {
96
- // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it
97
- // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).
99
+ // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since
100
+ // it fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).
98
101
  // Fixed point division requires multiplying by ONE_18.
99
102
  return ((ONE_18 * ONE_18) / exp(-x));
100
103
  }
101
104
 
102
- // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,
103
- // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7
105
+ // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call
106
+ // x_n, where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal
107
+ // 2^7
104
108
  // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the
105
109
  // decomposition.
106
- // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this
107
- // decomposition, which will be lower than the smallest x_n.
110
+ // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of
111
+ // this decomposition, which will be lower than the smallest x_n.
108
112
  // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.
109
113
  // We mutate x by subtracting x_n, making it the remainder of the decomposition.
110
114
 
111
115
  // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause
112
116
  // intermediate overflows. Instead we store them as plain integers, with 0 decimals.
113
- // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the
114
- // decomposition.
117
+ // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in
118
+ // the decomposition.
115
119
 
116
- // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct
117
- // it and compute the accumulated product.
120
+ // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so
121
+ // deduct it and compute the accumulated product.
118
122
 
119
123
  int256 firstAN;
120
124
  if (x >= x0) {
@@ -131,8 +135,8 @@ library LogExpMath {
131
135
  // smaller terms.
132
136
  x *= 100;
133
137
 
134
- // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point
135
- // one. Recall that fixed point multiplication requires dividing by ONE_20.
138
+ // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed
139
+ // point one. Recall that fixed point multiplication requires dividing by ONE_20.
136
140
  int256 product = ONE_20;
137
141
 
138
142
  if (x >= x2) {
@@ -170,8 +174,8 @@ library LogExpMath {
170
174
 
171
175
  // x10 and x11 are unnecessary here since we have high enough precision already.
172
176
 
173
- // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series
174
- // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).
177
+ // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor
178
+ // series expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).
175
179
 
176
180
  int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.
177
181
  int256 term; // Each term in the sum, where the nth term is (x^n / n!).
@@ -219,8 +223,9 @@ library LogExpMath {
219
223
  // 12 Taylor terms are sufficient for 18 decimal precision.
220
224
 
221
225
  // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor
222
- // approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to multiply
223
- // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),
226
+ // approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to
227
+ // multiply all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer
228
+ // multiplication),
224
229
  // and then drop two digits to return an 18 decimal value.
225
230
 
226
231
  return (((product * seriesSum) / ONE_20) * firstAN) / 100;
@@ -266,10 +271,11 @@ library LogExpMath {
266
271
  require(x < 2 ** 255, "x out of bounds");
267
272
  int256 x_int256 = int256(x);
268
273
 
269
- // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In
270
- // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.
274
+ // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36.
275
+ // In both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.
271
276
 
272
- // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.
277
+ // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit
278
+ // range.
273
279
  require(y < MILD_EXPONENT_BOUND, "y out of bounds");
274
280
  int256 y_int256 = int256(y);
275
281
 
@@ -277,8 +283,8 @@ library LogExpMath {
277
283
  if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {
278
284
  int256 ln_36_x = _ln_36(x_int256);
279
285
 
280
- // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just
281
- // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal
286
+ // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't
287
+ // just bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal
282
288
  // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the
283
289
  // (downscaled) last 18 decimals.
284
290
  logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);
@@ -289,8 +295,7 @@ library LogExpMath {
289
295
 
290
296
  // Finally, we compute exp(y * ln(x)) to arrive at x^y
291
297
  require(
292
- MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,
293
- "product out of bounds"
298
+ MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT, "product out of bounds"
294
299
  );
295
300
 
296
301
  return uint256(exp(logx_times_y));
@@ -304,25 +309,27 @@ library LogExpMath {
304
309
  unchecked {
305
310
  if (a < ONE_18) {
306
311
  // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less
307
- // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.
308
- // Fixed point division requires multiplying by ONE_18.
312
+ // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive
313
+ // call. Fixed point division requires multiplying by ONE_18.
309
314
  return (-_ln((ONE_18 * ONE_18) / a));
310
315
  }
311
316
 
312
- // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which
313
- // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,
314
- // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot
315
- // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.
316
- // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this
317
- // decomposition, which will be lower than the smallest a_n.
317
+ // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two,
318
+ // which we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n
319
+ // (that is,
320
+ // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers
321
+ // cannot be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.
322
+ // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of
323
+ // this decomposition, which will be lower than the smallest a_n.
318
324
  // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.
319
325
  // We mutate a by subtracting a_n, making it the remainder of the decomposition.
320
326
 
321
- // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point
322
- // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by
327
+ // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed
328
+ // point numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply
329
+ // them by
323
330
  // ONE_18 to convert them to fixed point.
324
- // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide
325
- // by it and compute the accumulated sum.
331
+ // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so
332
+ // divide by it and compute the accumulated sum.
326
333
 
327
334
  int256 sum = 0;
328
335
  if (a >= a0 * ONE_18) {
@@ -335,7 +342,8 @@ library LogExpMath {
335
342
  sum += x1;
336
343
  }
337
344
 
338
- // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.
345
+ // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this
346
+ // format.
339
347
  sum *= 100;
340
348
  a *= 100;
341
349
 
@@ -391,8 +399,8 @@ library LogExpMath {
391
399
  sum += x11;
392
400
  }
393
401
 
394
- // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series
395
- // that converges rapidly for values of `a` close to one - the same one used in ln_36.
402
+ // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor
403
+ // series that converges rapidly for values of `a` close to one - the same one used in ln_36.
396
404
  // Let z = (a - 1) / (a + 1).
397
405
  // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))
398
406
 
@@ -428,8 +436,9 @@ library LogExpMath {
428
436
  // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)
429
437
  seriesSum *= 2;
430
438
 
431
- // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both
432
- // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal
439
+ // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder
440
+ // (both with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18
441
+ // decimal
433
442
  // value.
434
443
 
435
444
  return (sum + seriesSum) / 100;
@@ -437,7 +446,8 @@ library LogExpMath {
437
446
  }
438
447
 
439
448
  /**
440
- * @dev Intrnal high precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,
449
+ * @dev Intrnal high precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point
450
+ * argument,
441
451
  * for x close to one.
442
452
  *
443
453
  * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.