@pendle/core-v2 6.5.0 → 6.6.1

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 (470) hide show
  1. package/LICENSE +12 -82
  2. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
  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/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  6. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.json +58 -2
  10. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
  12. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
  14. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  16. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  19. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
  21. package/build/artifacts/contracts/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.json +2 -2
  23. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  24. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  25. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  26. package/build/artifacts/contracts/core/Market/PendleMarketFactoryV7Upg.sol/PendleMarketFactoryV7Upg.dbg.json +1 -1
  27. package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.dbg.json +1 -1
  28. package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.json +2 -2
  29. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  30. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  31. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  32. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
  33. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
  36. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +2 -2
  37. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  39. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  44. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
  52. package/build/artifacts/contracts/cross-chain/FixedPricePTAMMV2.sol/FixedPricePTAMMV2.dbg.json +4 -0
  53. package/build/artifacts/contracts/cross-chain/FixedPricePTAMMV2.sol/FixedPricePTAMMV2.json +766 -0
  54. package/build/artifacts/contracts/cross-chain/PendleSwapHelper.sol/PendleSwapHelper.dbg.json +4 -0
  55. package/build/artifacts/contracts/cross-chain/PendleSwapHelper.sol/PendleSwapHelper.json +99 -0
  56. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBox.sol/DepositBox.dbg.json +4 -0
  57. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBox.sol/DepositBox.json +170 -0
  58. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.dbg.json +4 -0
  59. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.json +124 -0
  60. package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
  61. package/build/artifacts/contracts/cross-chain/funder/BridgeFunder.sol/BridgeFunder.dbg.json +4 -0
  62. package/build/artifacts/contracts/cross-chain/funder/BridgeFunder.sol/BridgeFunder.json +210 -0
  63. package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol/OFTAdapterAltImpl.dbg.json +4 -0
  64. package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol/OFTAdapterAltImpl.json +1294 -0
  65. package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
  66. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
  67. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalTokenAlt.sol/PendleBridgedPrincipalTokenAlt.dbg.json +4 -0
  68. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalTokenAlt.sol/PendleBridgedPrincipalTokenAlt.json +1602 -0
  69. package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +4 -0
  70. package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +1005 -0
  71. package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +4 -0
  72. package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +976 -0
  73. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  74. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  75. package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
  76. package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +1 -1
  77. package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
  78. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  79. package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +1 -1
  80. package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
  81. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
  82. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
  83. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  84. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  85. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  86. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  87. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
  88. package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
  89. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  90. package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
  91. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
  93. package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
  94. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
  95. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +0 -88
  96. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
  97. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
  98. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
  99. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
  101. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
  102. package/build/artifacts/contracts/interfaces/IPBridgeFunder.sol/IPBridgeFunder.dbg.json +4 -0
  103. package/build/artifacts/contracts/interfaces/IPBridgeFunder.sol/IPBridgeFunder.json +85 -0
  104. package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +1 -1
  105. package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +1 -1
  107. package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
  108. package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
  109. package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.dbg.json +4 -0
  112. package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +813 -0
  113. package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +4 -0
  114. package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.json +124 -0
  115. package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.dbg.json +4 -0
  116. package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.json +108 -0
  117. package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
  121. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMMV2.sol/IPFixedPricePTAMMSwapCallback.dbg.json +4 -0
  122. package/build/artifacts/contracts/interfaces/{IPFixedPricePTAMM.sol → IPFixedPricePTAMMV2.sol}/IPFixedPricePTAMMSwapCallback.json +1 -1
  123. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMMV2.sol/IPFixedPricePTAMMV2.dbg.json +4 -0
  124. package/build/artifacts/contracts/interfaces/{IPFixedPricePTAMM.sol/IPFixedPricePTAMM.json → IPFixedPricePTAMMV2.sol/IPFixedPricePTAMMV2.json} +285 -93
  125. package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
  126. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  127. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.json +56 -0
  128. package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
  129. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  130. package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
  131. package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
  132. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
  133. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
  134. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +387 -0
  135. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
  136. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  137. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  138. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
  139. package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +1 -1
  140. package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
  141. package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
  142. package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
  143. package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
  144. package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
  145. package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
  146. package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +1 -1
  147. package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
  148. package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
  149. package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
  150. package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
  151. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  152. package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
  153. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  154. package/build/artifacts/contracts/interfaces/IPStakedPendle.sol/IPStakedPendle.dbg.json +1 -1
  155. package/build/artifacts/contracts/interfaces/IPSwapHelper.sol/IPSwapHelper.dbg.json +4 -0
  156. package/build/artifacts/contracts/interfaces/{IPActionCrossChain.sol/IPActionCrossChain.json → IPSwapHelper.sol/IPSwapHelper.json} +2 -2
  157. package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.dbg.json +1 -1
  158. package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
  159. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  160. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  161. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  162. package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
  163. package/build/artifacts/contracts/interfaces/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
  164. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  165. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  166. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  167. package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
  168. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
  169. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
  170. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
  171. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.json +473 -11
  172. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  173. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +480 -13
  174. package/build/artifacts/contracts/limit/helpers/MintSyHelper.sol/MintSyHelper.dbg.json +4 -0
  175. package/build/artifacts/contracts/limit/helpers/MintSyHelper.sol/MintSyHelper.json +156 -0
  176. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
  177. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
  178. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
  179. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
  180. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
  181. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
  182. package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
  183. package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/ILegacyMarket.dbg.json +1 -1
  184. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  185. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
  186. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
  187. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
  188. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
  189. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
  190. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
  191. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
  192. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
  193. package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +1 -1
  194. package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +2 -2
  195. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
  196. package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.dbg.json +1 -1
  197. package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.json +2 -2
  198. package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
  199. package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +1 -1
  200. package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +33 -2
  201. package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
  202. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
  203. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
  204. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
  205. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
  206. package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.dbg.json +1 -1
  207. package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
  208. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
  209. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
  210. package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
  211. package/build/artifacts/contracts/offchain-helpers/PendleProxyAdmin.sol/PendleProxyAdmin.dbg.json +4 -0
  212. package/build/artifacts/contracts/offchain-helpers/PendleProxyAdmin.sol/PendleProxyAdmin.json +171 -0
  213. package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
  214. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
  215. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
  216. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
  217. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
  218. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
  219. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
  220. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
  221. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
  222. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
  223. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
  224. package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
  225. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
  226. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  227. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
  228. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  229. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
  230. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  231. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
  232. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  233. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
  234. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  235. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
  236. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  237. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
  238. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  239. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
  240. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
  241. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
  242. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
  243. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
  244. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  245. package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +1 -1
  246. package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.dbg.json +1 -1
  247. package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
  248. package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
  249. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  250. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
  251. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
  252. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
  253. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
  254. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
  255. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  256. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
  257. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
  258. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  259. package/build/artifacts/contracts/oracles/StatelessWrapper/PendleLinearDiscountOracleWrapper.sol/PendleLinearDiscountOracleWrapper.dbg.json +1 -1
  260. package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.dbg.json +1 -1
  261. package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
  262. package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
  263. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +1 -1
  264. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +1 -1
  265. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +1 -1
  266. package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
  267. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
  268. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
  269. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
  270. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
  271. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
  272. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
  273. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
  274. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
  275. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
  276. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
  277. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
  278. package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
  279. package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
  280. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
  281. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
  282. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
  283. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
  284. package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
  285. package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
  286. package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
  287. package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
  288. package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
  289. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  290. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
  291. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
  292. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  293. package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
  294. package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
  295. package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
  296. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
  297. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
  298. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
  299. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
  300. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
  301. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
  302. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
  303. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
  304. package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
  305. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
  306. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
  307. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
  308. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
  309. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
  310. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
  311. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  312. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  313. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol +12 -2
  314. package/contracts/core/libraries/TokenHelper.sol +6 -2
  315. package/contracts/cross-chain/FixedPricePTAMMV2.sol +162 -0
  316. package/contracts/{router/ActionCrossChain.sol → cross-chain/PendleSwapHelper.sol} +11 -7
  317. package/contracts/cross-chain/deposit-box/DepositBox.sol +66 -0
  318. package/contracts/cross-chain/deposit-box/DepositBoxFactory.sol +44 -0
  319. package/contracts/cross-chain/funder/BridgeFunder.sol +61 -0
  320. package/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol +55 -0
  321. package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalTokenAlt.sol +64 -0
  322. package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +101 -0
  323. package/contracts/cross-chain/swap-hub/SwapHubBase.sol +184 -0
  324. package/contracts/interfaces/IPAllActionTypeV3.sol +1 -0
  325. package/contracts/interfaces/IPAllActionV3.sol +1 -3
  326. package/contracts/interfaces/IPBridgeFunder.sol +17 -0
  327. package/contracts/interfaces/IPCrossChainSwapHub.sol +108 -0
  328. package/contracts/interfaces/IPDepositBox.sol +22 -0
  329. package/contracts/interfaces/IPDepositBoxFactory.sol +19 -0
  330. package/contracts/interfaces/IPFixedPricePTAMMV2.sol +58 -0
  331. package/contracts/interfaces/IPGaugeController.sol +7 -3
  332. package/contracts/interfaces/IPLimitRouter.sol +29 -0
  333. package/contracts/interfaces/{IPActionCrossChain.sol → IPSwapHelper.sol} +1 -1
  334. package/contracts/limit/LimitRouterBase.sol +100 -55
  335. package/contracts/limit/PendleLimitRouter.sol +24 -2
  336. package/contracts/limit/helpers/MintSyHelper.sol +114 -0
  337. package/contracts/offchain-helpers/PendleFeeSetter.sol +19 -1
  338. package/contracts/offchain-helpers/PendleProxyAdmin.sol +11 -0
  339. package/contracts/router/base/ActionBase.sol +16 -2
  340. package/deployments/1-core.json +11 -6
  341. package/deployments/1-offchain-helper.json +1 -1
  342. package/deployments/10-core.json +9 -4
  343. package/deployments/10-offchain-helper.json +1 -1
  344. package/deployments/130-core.json +9 -2
  345. package/deployments/143-core.json +19 -0
  346. package/deployments/146-core.json +9 -4
  347. package/deployments/146-offchain-helper.json +1 -1
  348. package/deployments/42161-core.json +9 -4
  349. package/deployments/42161-offchain-helper.json +1 -1
  350. package/deployments/4217-core.json +14 -0
  351. package/deployments/43114-core.json +6 -2
  352. package/deployments/43114-offchain-helper.json +3 -0
  353. package/deployments/5000-core.json +9 -4
  354. package/deployments/5000-offchain-helper.json +1 -1
  355. package/deployments/56-core.json +9 -4
  356. package/deployments/56-offchain-helper.json +1 -1
  357. package/deployments/57073-core.json +19 -0
  358. package/deployments/747474-core.json +19 -0
  359. package/deployments/80094-core.json +9 -4
  360. package/deployments/80094-offchain-helper.json +1 -1
  361. package/deployments/8453-core.json +9 -4
  362. package/deployments/8453-offchain-helper.json +1 -1
  363. package/deployments/9745-core.json +8 -3
  364. package/deployments/9745-offchain-helper.json +1 -1
  365. package/deployments/999-core.json +8 -3
  366. package/deployments/999-offchain-helper.json +1 -1
  367. package/package.json +2 -2
  368. package/typechain-types/BridgeFunder.ts +344 -0
  369. package/typechain-types/DepositBox.ts +260 -0
  370. package/typechain-types/DepositBoxFactory.ts +226 -0
  371. package/typechain-types/FixedPricePTAMMV2.ts +1104 -0
  372. package/typechain-types/IPAllActionV3.ts +0 -54
  373. package/typechain-types/IPBridgeFunder.ts +165 -0
  374. package/typechain-types/IPCrossChainSwapHub.ts +656 -0
  375. package/typechain-types/IPDepositBox.ts +213 -0
  376. package/typechain-types/IPDepositBoxFactory.ts +226 -0
  377. package/typechain-types/IPFixedPricePTAMMV2.ts +864 -0
  378. package/typechain-types/IPGaugeController.ts +86 -0
  379. package/typechain-types/IPLimitRouter.ts +187 -0
  380. package/typechain-types/IPSwapHelper.ts +161 -0
  381. package/typechain-types/LimitRouterBase.ts +295 -34
  382. package/typechain-types/MintSyHelper.ts +230 -0
  383. package/typechain-types/OFTAdapterAltImpl.ts +1350 -0
  384. package/typechain-types/PendleBridgedPrincipalTokenAlt.ts +1708 -0
  385. package/typechain-types/PendleCrossChainSwapHub.ts +911 -0
  386. package/typechain-types/PendleFeeSetter.ts +53 -0
  387. package/typechain-types/PendleGaugeControllerUpg.ts +86 -0
  388. package/typechain-types/PendleLimitRouter.ts +295 -34
  389. package/typechain-types/PendleProxyAdmin.ts +341 -0
  390. package/typechain-types/PendleSwapHelper.ts +161 -0
  391. package/typechain-types/ProxyAdmin.ts +341 -0
  392. package/typechain-types/SwapHubBase.ts +886 -0
  393. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
  394. package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
  395. package/typechain-types/factories/ActionCrossChain__factory.ts +1 -1
  396. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  397. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  398. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  399. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  400. package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
  401. package/typechain-types/factories/ActionSimple__factory.ts +1 -1
  402. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  403. package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
  404. package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
  405. package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
  406. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  407. package/typechain-types/factories/BridgeFunder__factory.ts +265 -0
  408. package/typechain-types/factories/DepositBoxFactory__factory.ts +189 -0
  409. package/typechain-types/factories/DepositBox__factory.ts +222 -0
  410. package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
  411. package/typechain-types/factories/FixedPricePTAMMV2__factory.ts +824 -0
  412. package/typechain-types/factories/FixedPricePTAMM__factory.ts +1 -1
  413. package/typechain-types/factories/IPAllActionV3__factory.ts +0 -88
  414. package/typechain-types/factories/IPBridgeFunder__factory.ts +100 -0
  415. package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +828 -0
  416. package/typechain-types/factories/IPDepositBoxFactory__factory.ts +123 -0
  417. package/typechain-types/factories/IPDepositBox__factory.ts +136 -0
  418. package/typechain-types/factories/IPFixedPricePTAMMV2__factory.ts +621 -0
  419. package/typechain-types/factories/IPGaugeController__factory.ts +56 -0
  420. package/typechain-types/factories/IPLimitRouter__factory.ts +387 -0
  421. package/typechain-types/factories/IPSwapHelper__factory.ts +111 -0
  422. package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
  423. package/typechain-types/factories/LimitRouterBase__factory.ts +473 -11
  424. package/typechain-types/factories/MarketSweed__factory.ts +1 -1
  425. package/typechain-types/factories/MintSyHelper__factory.ts +168 -0
  426. package/typechain-types/factories/OFTAdapterAltImpl__factory.ts +1363 -0
  427. package/typechain-types/factories/PendleAPIFeeDepositor__factory.ts +1 -1
  428. package/typechain-types/factories/PendleBridgedPrincipalTokenAlt__factory.ts +1702 -0
  429. package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
  430. package/typechain-types/factories/PendleCrossChainSwapHub__factory.ts +1074 -0
  431. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  432. package/typechain-types/factories/PendleFeeSetter__factory.ts +36 -1
  433. package/typechain-types/factories/PendleGaugeControllerUpg__factory.ts +57 -1
  434. package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
  435. package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
  436. package/typechain-types/factories/PendleLimitRouter__factory.ts +483 -13
  437. package/typechain-types/factories/PendleMarketV7__factory.ts +1 -1
  438. package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
  439. package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
  440. package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
  441. package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
  442. package/typechain-types/factories/PendleProxyAdmin__factory.ts +229 -0
  443. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  444. package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
  445. package/typechain-types/factories/PendleSwapHelper__factory.ts +152 -0
  446. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  447. package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +1 -1
  448. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  449. package/typechain-types/factories/ProxyAdmin__factory.ts +210 -0
  450. package/typechain-types/factories/Reflector__factory.ts +1 -1
  451. package/typechain-types/factories/StakedPendle__factory.ts +1 -1
  452. package/typechain-types/factories/SwapHubBase__factory.ts +988 -0
  453. package/typechain-types/hardhat.d.ts +180 -9
  454. package/typechain-types/index.ts +36 -2
  455. package/build/artifacts/contracts/StPendle.sol/RoundDataLib.dbg.json +0 -4
  456. package/build/artifacts/contracts/StPendle.sol/RoundDataLib.json +0 -10
  457. package/build/artifacts/contracts/StPendle.sol/StPendle.dbg.json +0 -4
  458. package/build/artifacts/contracts/StPendle.sol/StPendle.json +0 -228
  459. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +0 -4
  460. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +0 -667
  461. package/build/artifacts/contracts/interfaces/IPActionCrossChain.sol/IPActionCrossChain.dbg.json +0 -4
  462. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +0 -4
  463. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +0 -4
  464. package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.dbg.json +0 -4
  465. package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.json +0 -99
  466. package/contracts/StPendle.sol +0 -121
  467. package/contracts/cross-chain/FixedPricePTAMM.sol +0 -200
  468. package/contracts/interfaces/IPFixedPricePTAMM.sol +0 -69
  469. package/typechain-types/StPendle.ts +0 -362
  470. package/typechain-types/factories/StPendle__factory.ts +0 -260
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/629fea15dac69f6245253d3f8cf83f4e.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/629fea15dac69f6245253d3f8cf83f4e.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/629fea15dac69f6245253d3f8cf83f4e.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/629fea15dac69f6245253d3f8cf83f4e.json"
4
- }
@@ -1,99 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "ActionCrossChain",
4
- "sourceName": "contracts/router/ActionCrossChain.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "address",
10
- "name": "receiver",
11
- "type": "address"
12
- },
13
- {
14
- "internalType": "address",
15
- "name": "fixedPricePTAMM",
16
- "type": "address"
17
- },
18
- {
19
- "internalType": "address",
20
- "name": "PT",
21
- "type": "address"
22
- },
23
- {
24
- "internalType": "uint256",
25
- "name": "exactPtIn",
26
- "type": "uint256"
27
- },
28
- {
29
- "components": [
30
- {
31
- "internalType": "address",
32
- "name": "tokenOut",
33
- "type": "address"
34
- },
35
- {
36
- "internalType": "uint256",
37
- "name": "minTokenOut",
38
- "type": "uint256"
39
- },
40
- {
41
- "internalType": "address",
42
- "name": "tokenRedeemSy",
43
- "type": "address"
44
- },
45
- {
46
- "internalType": "address",
47
- "name": "pendleSwap",
48
- "type": "address"
49
- },
50
- {
51
- "components": [
52
- {
53
- "internalType": "enum SwapType",
54
- "name": "swapType",
55
- "type": "uint8"
56
- },
57
- {
58
- "internalType": "address",
59
- "name": "extRouter",
60
- "type": "address"
61
- },
62
- {
63
- "internalType": "bytes",
64
- "name": "extCalldata",
65
- "type": "bytes"
66
- },
67
- {
68
- "internalType": "bool",
69
- "name": "needScale",
70
- "type": "bool"
71
- }
72
- ],
73
- "internalType": "struct SwapData",
74
- "name": "swapData",
75
- "type": "tuple"
76
- }
77
- ],
78
- "internalType": "struct TokenOutput",
79
- "name": "out",
80
- "type": "tuple"
81
- }
82
- ],
83
- "name": "swapWithFixedPricePTAMM",
84
- "outputs": [
85
- {
86
- "internalType": "uint256",
87
- "name": "netTokenOut",
88
- "type": "uint256"
89
- }
90
- ],
91
- "stateMutability": "nonpayable",
92
- "type": "function"
93
- }
94
- ],
95
- "bytecode": "0x6080604052348015600e575f5ffd5b50610b7d8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a58f46c61461002d575b5f5ffd5b61004061003b366004610862565b610052565b60405190815260200160405180910390f35b5f61005f84338786610115565b5f856001600160a01b031663df0fe2eb6100798986610136565b878761008b6060890160408a016108db565b604080515f815260208101918290526001600160e01b031960e088901b169091526100bd949392919060248101610948565b6020604051808303815f875af11580156100d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100fd9190610982565b905061010a8782856101b2565b979650505050505050565b8015610130576101306001600160a01b038516848484610360565b50505050565b5f806101456080840184610999565b6101539060208101906109c5565b90505f81600a811115610168576101686109de565b0361017657839150506101ac565b600381600a81111561018a5761018a6109de565b0361019857309150506101ac565b6101a860808401606085016108db565b9150505b92915050565b5f806101c16080840184610999565b6101cf9060208101906109c5565b90505f81600a8111156101e4576101e46109de565b036101f1578391506102ff565b600381600a811115610205576102056109de565b0361024f5783915061023361022060608501604086016108db565b61022d60208601866108db565b846103cb565b61024a61024360208501856108db565b8684610489565b6102ff565b61025f60808401606085016108db565b6001600160a01b0316632bdb823c61027d60608601604087016108db565b8661028b6080880188610999565b6040518463ffffffff1660e01b81526004016102a993929190610a35565b5f604051808303815f87803b1580156102c0575f5ffd5b505af11580156102d2573d5f5f3e3d5ffd5b506102ed92506102e891505060208501856108db565b610548565b91506102ff61024360208501856108db565b82602001358210156103585760405162461bcd60e51b815260206004820181905260248201527f536c6970706167653a20494e53554646494349454e545f544f4b454e5f4f555460448201526064015b60405180910390fd5b509392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526101309085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526105ca565b6001600160a01b03831661042e57816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b158015610412575f5ffd5b505af1158015610424573d5f5f3e3d5ffd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d906024015f604051808303815f87803b15801561046d575f5ffd5b505af115801561047f573d5f5f3e3d5ffd5b505050505b505050565b805f0361049557505050565b6001600160a01b038316610534575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f81146104ec576040519150601f19603f3d011682016040523d82523d5f602084013e6104f1565b606091505b50509050806101305760405162461bcd60e51b815260206004820152600f60248201526e195d1a081cd95b990819985a5b1959608a1b604482015260640161034f565b6104846001600160a01b038416838361069d565b5f6001600160a01b038216156105c3576040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561059a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105be9190610982565b6101ac565b4792915050565b5f61061e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106cd9092919063ffffffff16565b905080515f148061063e57508080602001905181019061063e9190610b09565b6104845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161034f565b6040516001600160a01b03831660248201526044810182905261048490849063a9059cbb60e01b90606401610394565b60606106db84845f856106e3565b949350505050565b6060824710156107445760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161034f565b5f5f866001600160a01b0316858760405161075f9190610b24565b5f6040518083038185875af1925050503d805f8114610799576040519150601f19603f3d011682016040523d82523d5f602084013e61079e565b606091505b509150915061010a87838387606083156108185782515f03610811576001600160a01b0385163b6108115760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161034f565b50816106db565b6106db838381511561082d5781518083602001fd5b8060405162461bcd60e51b815260040161034f9190610b35565b80356001600160a01b038116811461085d575f5ffd5b919050565b5f5f5f5f5f60a08688031215610876575f5ffd5b61087f86610847565b945061088d60208701610847565b935061089b60408701610847565b92506060860135915060808601356001600160401b038111156108bc575f5ffd5b860160a081890312156108cd575f5ffd5b809150509295509295909350565b5f602082840312156108eb575f5ffd5b6108f482610847565b9392505050565b5f5b838110156109155781810151838201526020016108fd565b50505f910152565b5f81518084526109348160208601602086016108fb565b601f01601f19169290920160200192915050565b6001600160a01b0386811682528581166020830152604082018590528316606082015260a0608082018190525f9061010a9083018461091d565b5f60208284031215610992575f5ffd5b5051919050565b5f8235607e198336030181126109ad575f5ffd5b9190910192915050565b8035600b811061085d575f5ffd5b5f602082840312156109d5575f5ffd5b6108f4826109b7565b634e487b7160e01b5f52602160045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b8015158114610a27575f5ffd5b50565b803561085d81610a1a565b6001600160a01b038416815260208101839052606060408201525f610a59836109b7565b600b8110610a7557634e487b7160e01b5f52602160045260245ffd5b60608301526001600160a01b03610a8e60208501610847565b1660808301526040830135601e19843603018112610aaa575f5ffd5b83016020810190356001600160401b03811115610ac5575f5ffd5b803603821315610ad3575f5ffd5b608060a0850152610ae860e0850182846109f2565b915050610af760608501610a2a565b80151560c08501525095945050505050565b5f60208284031215610b19575f5ffd5b81516108f481610a1a565b5f82516109ad8184602087016108fb565b602081525f6108f4602083018461091d56fea2646970667358221220e131cbf8a82cb7dde794864937f49ba456b39f8110ded5f08ccb33f79a2aeb7964736f6c634300081e0033",
96
- "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a58f46c61461002d575b5f5ffd5b61004061003b366004610862565b610052565b60405190815260200160405180910390f35b5f61005f84338786610115565b5f856001600160a01b031663df0fe2eb6100798986610136565b878761008b6060890160408a016108db565b604080515f815260208101918290526001600160e01b031960e088901b169091526100bd949392919060248101610948565b6020604051808303815f875af11580156100d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100fd9190610982565b905061010a8782856101b2565b979650505050505050565b8015610130576101306001600160a01b038516848484610360565b50505050565b5f806101456080840184610999565b6101539060208101906109c5565b90505f81600a811115610168576101686109de565b0361017657839150506101ac565b600381600a81111561018a5761018a6109de565b0361019857309150506101ac565b6101a860808401606085016108db565b9150505b92915050565b5f806101c16080840184610999565b6101cf9060208101906109c5565b90505f81600a8111156101e4576101e46109de565b036101f1578391506102ff565b600381600a811115610205576102056109de565b0361024f5783915061023361022060608501604086016108db565b61022d60208601866108db565b846103cb565b61024a61024360208501856108db565b8684610489565b6102ff565b61025f60808401606085016108db565b6001600160a01b0316632bdb823c61027d60608601604087016108db565b8661028b6080880188610999565b6040518463ffffffff1660e01b81526004016102a993929190610a35565b5f604051808303815f87803b1580156102c0575f5ffd5b505af11580156102d2573d5f5f3e3d5ffd5b506102ed92506102e891505060208501856108db565b610548565b91506102ff61024360208501856108db565b82602001358210156103585760405162461bcd60e51b815260206004820181905260248201527f536c6970706167653a20494e53554646494349454e545f544f4b454e5f4f555460448201526064015b60405180910390fd5b509392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526101309085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526105ca565b6001600160a01b03831661042e57816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b158015610412575f5ffd5b505af1158015610424573d5f5f3e3d5ffd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d906024015f604051808303815f87803b15801561046d575f5ffd5b505af115801561047f573d5f5f3e3d5ffd5b505050505b505050565b805f0361049557505050565b6001600160a01b038316610534575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f81146104ec576040519150601f19603f3d011682016040523d82523d5f602084013e6104f1565b606091505b50509050806101305760405162461bcd60e51b815260206004820152600f60248201526e195d1a081cd95b990819985a5b1959608a1b604482015260640161034f565b6104846001600160a01b038416838361069d565b5f6001600160a01b038216156105c3576040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561059a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105be9190610982565b6101ac565b4792915050565b5f61061e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106cd9092919063ffffffff16565b905080515f148061063e57508080602001905181019061063e9190610b09565b6104845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161034f565b6040516001600160a01b03831660248201526044810182905261048490849063a9059cbb60e01b90606401610394565b60606106db84845f856106e3565b949350505050565b6060824710156107445760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161034f565b5f5f866001600160a01b0316858760405161075f9190610b24565b5f6040518083038185875af1925050503d805f8114610799576040519150601f19603f3d011682016040523d82523d5f602084013e61079e565b606091505b509150915061010a87838387606083156108185782515f03610811576001600160a01b0385163b6108115760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161034f565b50816106db565b6106db838381511561082d5781518083602001fd5b8060405162461bcd60e51b815260040161034f9190610b35565b80356001600160a01b038116811461085d575f5ffd5b919050565b5f5f5f5f5f60a08688031215610876575f5ffd5b61087f86610847565b945061088d60208701610847565b935061089b60408701610847565b92506060860135915060808601356001600160401b038111156108bc575f5ffd5b860160a081890312156108cd575f5ffd5b809150509295509295909350565b5f602082840312156108eb575f5ffd5b6108f482610847565b9392505050565b5f5b838110156109155781810151838201526020016108fd565b50505f910152565b5f81518084526109348160208601602086016108fb565b601f01601f19169290920160200192915050565b6001600160a01b0386811682528581166020830152604082018590528316606082015260a0608082018190525f9061010a9083018461091d565b5f60208284031215610992575f5ffd5b5051919050565b5f8235607e198336030181126109ad575f5ffd5b9190910192915050565b8035600b811061085d575f5ffd5b5f602082840312156109d5575f5ffd5b6108f4826109b7565b634e487b7160e01b5f52602160045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b8015158114610a27575f5ffd5b50565b803561085d81610a1a565b6001600160a01b038416815260208101839052606060408201525f610a59836109b7565b600b8110610a7557634e487b7160e01b5f52602160045260245ffd5b60608301526001600160a01b03610a8e60208501610847565b1660808301526040830135601e19843603018112610aaa575f5ffd5b83016020810190356001600160401b03811115610ac5575f5ffd5b803603821315610ad3575f5ffd5b608060a0850152610ae860e0850182846109f2565b915050610af760608501610a2a565b80151560c08501525095945050505050565b5f60208284031215610b19575f5ffd5b81516108f481610a1a565b5f82516109ad8184602087016108fb565b602081525f6108f4602083018461091d56fea2646970667358221220e131cbf8a82cb7dde794864937f49ba456b39f8110ded5f08ccb33f79a2aeb7964736f6c634300081e0033",
97
- "linkReferences": {},
98
- "deployedLinkReferences": {}
99
- }
@@ -1,121 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.28;
4
-
5
- import {PMath} from "./core/libraries/math/PMath.sol";
6
-
7
- enum State {
8
- B, // Benefitting
9
- F // Forfeited
10
- }
11
-
12
- struct RoundData {
13
- uint256 roundId;
14
- uint256 totalPooled;
15
- uint256 totalShares;
16
-
17
- uint256 _pooledForfeited;
18
- uint256 _sharesForfeited;
19
- }
20
-
21
- library RoundDataLib {
22
- using PMath for uint256;
23
-
24
- function sharesForfeited(RoundData storage self) public view returns (uint256) {
25
- return self._sharesForfeited;
26
- }
27
-
28
- function sharesBenefitting(RoundData storage self) public view returns (uint256) {
29
- return self.totalShares - self._sharesForfeited;
30
- }
31
-
32
- function pooledForfeited(RoundData storage self) public view returns (uint256) {
33
- return self._pooledForfeited;
34
- }
35
-
36
- function pooledBenefitting(RoundData storage self) public view returns (uint256) {
37
- return self.totalPooled.mulDown(self.totalShares) - self._pooledForfeited;
38
- }
39
- }
40
-
41
- using RoundDataLib for RoundData;
42
-
43
- struct UserData {
44
- State state;
45
- uint256 metaShares;
46
- uint256 lastVotedRound;
47
- uint256 forfeitedUntilRound;
48
- }
49
-
50
- contract StPendle {
51
- using PMath for uint256;
52
-
53
- mapping(address user => UserData) users;
54
- mapping(uint256 roundId => RoundData) rounds;
55
-
56
- uint256 curRound;
57
- uint256 processedRound;
58
-
59
- modifier onlyAdmin() {
60
- // placeholder
61
- _;
62
- }
63
-
64
- function hasInteractedBefore(address user) public view returns (bool) {
65
- return users[user].metaShares > 0;
66
- }
67
-
68
- function curRoundData() internal view returns (RoundData storage stf) {
69
- return rounds[curRound];
70
- }
71
-
72
- function getSideData(State state) public view returns (uint256 sidedPooled, uint256 sidedShares) {
73
- RoundData storage rd = curRoundData();
74
- return state == State.B //
75
- ? (rd.pooledBenefitting(), rd.sharesBenefitting())
76
- : (rd.pooledForfeited(), rd.sharesForfeited());
77
- }
78
-
79
- // helper to get user data with adjusted state and meta shares
80
- function getUserData(address user) external view returns (UserData memory) {
81
- // need to adjust user data based on curRound and processedRound
82
- return users[user];
83
- }
84
-
85
- function sharesValue(uint256 numShares) public view returns (uint256) {
86
- RoundData storage rd = curRoundData();
87
- if (rd.totalShares == 0) {
88
- return 0;
89
- }
90
- return (numShares * rd.totalPooled) / rd.totalShares;
91
- }
92
-
93
- function sharesOf(address user) public view returns (uint256) {
94
- UserData memory data = users[user];
95
- (, uint256 sidedShares) = getSideData(data.state);
96
- return data.metaShares.mulDown(sidedShares);
97
- }
98
-
99
- function balanceOf(address user) external view returns (uint256) {
100
- return sharesValue(sharesOf(user)); // demonstration only, need to be more precise
101
- }
102
-
103
- function distribute(uint256 amount) external onlyAdmin {
104
- RoundData storage rd = curRoundData();
105
- rd.totalPooled += amount;
106
- rd._sharesForfeited = rd._pooledForfeited / rd.totalPooled;
107
-
108
- ++processedRound;
109
- }
110
-
111
- function votingBegin() public onlyAdmin {
112
- ++curRound;
113
- }
114
-
115
- function votingFinalize() public onlyAdmin {
116
- // todo moving group logic
117
- }
118
-
119
- // just record a vote, no actual voting logic
120
- function doVote() external {}
121
- }
@@ -1,200 +0,0 @@
1
- // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
- pragma solidity ^0.8.19;
3
-
4
- import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
5
- import {IPFixedPricePTAMM, IPFixedPricePTAMMSwapCallback} from "../interfaces/IPFixedPricePTAMM.sol";
6
-
7
- import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
8
-
9
- import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
10
- import {TokenHelper} from "../core/libraries/TokenHelper.sol";
11
- import {PMath} from "../core/libraries/math/PMath.sol";
12
- import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
13
-
14
- contract FixedPricePTAMM is
15
- IPFixedPricePTAMM,
16
- BoringOwnableUpgradeableV2,
17
- ReentrancyGuardUpgradeable,
18
- TokenHelper,
19
- UUPSUpgradeable
20
- {
21
- // cast index-erc7201 "pendle.FixedPricePTAMM.storage"
22
- uint256 internal constant STORAGE_SLOT = 0xbbf04d9aae855c6bd76c8f4ba7a918994ad0d002f537323e58c83cbfe5249000;
23
-
24
- error OracleNotSet(address PT, address token);
25
- error InsufficientTokenForTrade(address token, uint256 actualAmount, uint256 requiredAmount);
26
- error InsufficientPtReceived(address PT, uint256 actualAmount, uint256 requiredAmount);
27
-
28
- using PMath for uint256;
29
- using PMath for int256;
30
-
31
- constructor() {
32
- _disableInitializers();
33
- }
34
-
35
- function initialize(address _owner) external initializer {
36
- __BoringOwnableV2_init(_owner);
37
- __UUPSUpgradeable_init();
38
- }
39
-
40
- struct OracleData {
41
- address oracle;
42
- // @notice This can be seen as the price at maturity.
43
- // @notice This can help with decimals conversion.
44
- uint256 multiplier;
45
- }
46
-
47
- struct Storage {
48
- mapping(address PT => mapping(address token => OracleData)) priceOracle;
49
- mapping(address token => uint256) totalToken;
50
- }
51
-
52
- function $() internal pure returns (Storage storage res) {
53
- assembly ("memory-safe") {
54
- res.slot := STORAGE_SLOT
55
- }
56
- }
57
-
58
- function priceOracle(address PT, address token)
59
- public
60
- view
61
- returns (IPChainlinkOracleEssential oracle, uint256 multiplier)
62
- {
63
- oracle = IPChainlinkOracleEssential($().priceOracle[PT][token].oracle);
64
- multiplier = $().priceOracle[PT][token].multiplier;
65
-
66
- if (address(oracle) == address(0)) revert OracleNotSet(PT, token);
67
- }
68
-
69
- function previewSwapPtForExactToken(address PT, address token, uint256 exactTokenOut)
70
- public
71
- view
72
- returns (uint256 amountPtIn)
73
- {
74
- (IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
75
- (, int256 rawPrice,,,) = oracle.latestRoundData();
76
-
77
- // ceil(exactTokenOut / (rawPrice * multiplier))
78
- return (exactTokenOut * PMath.ONE * PMath.ONE).rawDivUp(rawPrice.Uint() * multiplier);
79
- }
80
-
81
- function previewSwapExactPtForToken(address PT, uint256 exactPtIn, address token)
82
- public
83
- view
84
- returns (uint256 amountTokenOut)
85
- {
86
- (IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
87
- (, int256 rawPrice,,,) = oracle.latestRoundData();
88
-
89
- // exactPtIn * rawPrice * multiplier
90
- return (exactPtIn * rawPrice.Uint() * multiplier) / (PMath.ONE * PMath.ONE);
91
- }
92
-
93
- function swapPtForExactToken(
94
- address receiver,
95
- address PT,
96
- address token,
97
- uint256 exactTokenOut,
98
- bytes calldata data
99
- ) external nonReentrant returns (uint256 netPtIn) {
100
- return _swapPtForExactToken(receiver, PT, token, exactTokenOut, data, false);
101
- }
102
-
103
- function swapExactPtForToken(address receiver, address PT, uint256 exactPtIn, address token, bytes calldata data)
104
- external
105
- nonReentrant
106
- returns (uint256 netTokenOut)
107
- {
108
- return _swapExactPtForToken(receiver, PT, exactPtIn, token, data, false);
109
- }
110
-
111
- function transferInThenSwapPtForExactToken(address receiver, address PT, address token, uint256 exactTokenOut)
112
- external
113
- nonReentrant
114
- returns (uint256 netPtIn)
115
- {
116
- return _swapPtForExactToken(receiver, PT, token, exactTokenOut, "", true);
117
- }
118
-
119
- function transferInThenSwapExactPtForToken(address receiver, address PT, uint256 exactPtIn, address token)
120
- external
121
- nonReentrant
122
- returns (uint256 netPtIn)
123
- {
124
- return _swapExactPtForToken(receiver, PT, exactPtIn, token, "", true);
125
- }
126
-
127
- function _swapPtForExactToken(
128
- address receiver,
129
- address PT,
130
- address token,
131
- uint256 exactTokenOut,
132
- bytes memory data,
133
- bool doTransferIn
134
- ) internal returns (uint256 netPtIn) {
135
- netPtIn = previewSwapPtForExactToken(PT, token, exactTokenOut);
136
- if (doTransferIn) _transferIn(PT, msg.sender, netPtIn);
137
- _swap(receiver, PT, netPtIn, token, exactTokenOut, data);
138
- }
139
-
140
- function _swapExactPtForToken(
141
- address receiver,
142
- address PT,
143
- uint256 exactPtIn,
144
- address token,
145
- bytes memory data,
146
- bool doTransferIn
147
- ) internal returns (uint256 netTokenOut) {
148
- netTokenOut = previewSwapExactPtForToken(PT, exactPtIn, token);
149
- if (doTransferIn) _transferIn(PT, msg.sender, exactPtIn);
150
- _swap(receiver, PT, exactPtIn, token, netTokenOut, data);
151
- }
152
-
153
- function _swap(
154
- address receiver,
155
- address PT,
156
- uint256 exactPtIn,
157
- address token,
158
- uint256 exactTokenOut,
159
- bytes memory data
160
- ) internal {
161
- if ($().totalToken[token] < exactTokenOut) {
162
- revert InsufficientTokenForTrade(token, $().totalToken[token], exactTokenOut);
163
- }
164
-
165
- _transferOut(token, receiver, exactTokenOut);
166
- $().totalToken[token] -= exactTokenOut;
167
-
168
- if (data.length > 0) {
169
- IPFixedPricePTAMMSwapCallback(msg.sender).swapCallback(exactTokenOut, exactPtIn, data);
170
- }
171
-
172
- $().totalToken[PT] += exactPtIn;
173
- if (_selfBalance(PT) < $().totalToken[PT]) {
174
- revert InsufficientPtReceived(PT, _selfBalance(PT), $().totalToken[PT]);
175
- }
176
-
177
- emit Swap(msg.sender, receiver, PT, exactPtIn, token, exactTokenOut);
178
- }
179
-
180
- // Admin functions
181
-
182
- function setPriceOracle(address PT, address token, address _priceOracle, uint256 _multiplier) external onlyOwner {
183
- $().priceOracle[PT][token] = OracleData(_priceOracle, _multiplier);
184
- emit PriceOracleUpdated(PT, token, _priceOracle);
185
- }
186
-
187
- function addFund(address token, uint256 amount) external payable onlyOwner {
188
- _transferIn(token, owner, amount);
189
- $().totalToken[token] += amount;
190
- emit Seeded(token, amount);
191
- }
192
-
193
- function removeFund(address token, uint256 amount) external onlyOwner {
194
- _transferOut(token, owner, amount);
195
- $().totalToken[token] -= amount;
196
- emit Unseeded(token, amount);
197
- }
198
-
199
- function _authorizeUpgrade(address) internal override onlyOwner {}
200
- }
@@ -1,69 +0,0 @@
1
- // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
- pragma solidity ^0.8.19;
3
-
4
- import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
5
- import {IPBridgedPrincipalToken} from "./IPBridgedPrincipalToken.sol";
6
- import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
7
-
8
- interface IPFixedPricePTAMM {
9
- event Swap(
10
- address indexed caller,
11
- address indexed receiver,
12
- address PT,
13
- uint256 netPtIn,
14
- address token,
15
- uint256 netTokenOut
16
- );
17
-
18
- event PriceOracleUpdated(address indexed PT, address indexed token, address indexed priceOracle);
19
-
20
- event Seeded(address indexed token, uint256 amount);
21
- event Unseeded(address indexed token, uint256 amount);
22
-
23
- function priceOracle(address PT, address token)
24
- external
25
- view
26
- returns (IPChainlinkOracleEssential, uint256 multiplier);
27
-
28
- function previewSwapPtForExactToken(address PT, address token, uint256 exactTokenOut)
29
- external
30
- view
31
- returns (uint256 amountPtIn);
32
-
33
- function previewSwapExactPtForToken(address PT, uint256 exactPtIn, address token)
34
- external
35
- view
36
- returns (uint256 amountTokenOut);
37
-
38
- function swapPtForExactToken(
39
- address receiver,
40
- address PT,
41
- address token,
42
- uint256 exactTokenOut,
43
- bytes calldata data
44
- ) external returns (uint256 netPtIn);
45
-
46
- function swapExactPtForToken(address receiver, address PT, uint256 exactPtIn, address token, bytes calldata data)
47
- external
48
- returns (uint256 netTokenOut);
49
-
50
- function transferInThenSwapPtForExactToken(address receiver, address PT, address token, uint256 exactTokenOut)
51
- external
52
- returns (uint256 netPtIn);
53
-
54
- function transferInThenSwapExactPtForToken(address receiver, address PT, uint256 exactPtIn, address token)
55
- external
56
- returns (uint256 netPtIn);
57
-
58
- // Admin functions
59
-
60
- function setPriceOracle(address PT, address token, address priceOracle, uint256 multiplier) external;
61
-
62
- function addFund(address token, uint256 amount) external payable;
63
-
64
- function removeFund(address token, uint256 amount) external;
65
- }
66
-
67
- interface IPFixedPricePTAMMSwapCallback {
68
- function swapCallback(uint256 exactTokenOut, uint256 netPtIn, bytes calldata data) external;
69
- }