@pendle/core-v2 0.15.1-mainnet → 0.15.2-mainnet

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 (402) 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 +15 -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 +15 -2
  6. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.json +13 -0
  8. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +15 -2
  11. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +1 -1
  12. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +15 -2
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  14. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +13 -0
  15. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  16. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +15 -2
  17. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +15 -2
  19. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +15 -2
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +15 -2
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +15 -2
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  33. package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +4 -0
  35. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +699 -0
  36. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +4 -0
  37. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +515 -0
  38. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +4 -0
  39. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +10 -0
  40. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  42. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  44. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  47. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +77 -17
  49. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
  53. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +4 -0
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +1003 -0
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +4 -0
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +1068 -0
  63. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +4 -0
  64. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.json +10 -0
  65. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +4 -0
  66. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +10 -0
  67. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +4 -0
  68. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.json +10 -0
  69. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +4 -0
  70. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/{ConvexCurveLP → base}/PendleConvexLPSY.sol/PendleConvexLPSY.json +1 -1
  71. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +4 -0
  72. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +856 -0
  73. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  74. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  75. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  76. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  77. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +15 -2
  78. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  79. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +85 -4
  80. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  81. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +17 -4
  82. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
  84. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  85. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
  86. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  87. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +3 -38
  88. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  89. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
  90. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
  91. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.json +13 -0
  92. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  93. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.json +2 -2
  94. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  95. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +284 -31
  96. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  97. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
  98. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.json +1 -1
  99. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.json +39 -85
  101. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +4 -0
  102. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.json +213 -0
  103. package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
  104. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  105. package/build/artifacts/contracts/interfaces/ILooksFeeSharing.sol/ILooksFeeSharing.dbg.json +4 -0
  106. package/build/artifacts/contracts/interfaces/ILooksFeeSharing.sol/ILooksFeeSharing.json +30 -0
  107. package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.dbg.json +4 -0
  108. package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.json +76 -0
  109. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +91 -17
  111. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
  112. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +50 -0
  113. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  114. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +20 -0
  115. package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +20 -0
  118. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +181 -17
  120. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +4 -0
  121. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.json +173 -0
  122. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +4 -0
  123. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.json +86 -0
  124. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +4 -0
  125. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.json +34 -0
  126. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  127. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  128. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.json +2 -2
  129. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  130. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  131. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  132. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  133. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +1 -1
  134. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  135. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  136. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  137. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  138. package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +1 -1
  139. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
  140. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.json +45 -0
  141. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  142. package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +1 -1
  143. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  144. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  145. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +15 -2
  146. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +4 -0
  147. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +35 -0
  148. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
  149. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -80
  150. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
  151. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +271 -61
  152. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  153. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +102 -41
  154. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  155. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
  156. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
  157. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +61 -24
  158. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
  159. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
  160. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  161. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +31 -24
  162. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
  163. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
  164. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  165. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +31 -24
  166. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  167. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +15 -2
  168. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
  169. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json +1 -1
  170. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  171. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  172. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  173. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  174. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
  175. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +191 -2
  176. package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.dbg.json +4 -0
  177. package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.json +35 -0
  178. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
  179. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.json +1 -1
  180. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +58 -27
  181. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +46 -12
  182. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +31 -7
  183. package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +133 -0
  184. package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +27 -0
  185. package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +9 -10
  186. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +9 -23
  187. package/contracts/core/BulkSeller/BulkSeller.sol +259 -0
  188. package/contracts/core/BulkSeller/BulkSellerFactory.sol +88 -0
  189. package/contracts/core/BulkSeller/BulkSellerMathCore.sol +143 -0
  190. package/contracts/core/Market/PendleMarket.sol +18 -7
  191. package/contracts/core/Market/PendleMarketFactory.sol +15 -5
  192. package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +102 -0
  193. package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +160 -0
  194. package/contracts/core/StandardizedYield/implementations/Convex/README.md +29 -0
  195. package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +215 -0
  196. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +127 -0
  197. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +152 -0
  198. package/contracts/core/StandardizedYield/implementations/Convex/{ConvexCurveLP → base}/PendleConvexLPSY.sol +2 -4
  199. package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +122 -0
  200. package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +17 -8
  201. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
  202. package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +38 -11
  203. package/contracts/core/YieldContracts/PendleYieldToken.sol +54 -21
  204. package/contracts/core/erc20/PendleERC20.sol +4 -7
  205. package/contracts/core/libraries/BaseSplitCodeFactory.sol +1 -1
  206. package/contracts/core/libraries/BoringOwnableUpgradeable.sol +1 -1
  207. package/contracts/core/libraries/Errors.sol +32 -4
  208. package/contracts/core/libraries/StringLib.sol +782 -0
  209. package/contracts/core/libraries/TokenHelper.sol +9 -0
  210. package/contracts/interfaces/ConvexCurve/IBooster.sol +1 -1
  211. package/contracts/interfaces/Curve/ICrvPool.sol +12 -31
  212. package/contracts/interfaces/Curve/ITriCrvPool.sol +41 -0
  213. package/contracts/interfaces/ILayerZeroEndpoint.sol +39 -0
  214. package/contracts/interfaces/ILayerZeroReceiver.sol +12 -0
  215. package/contracts/interfaces/ILooksFeeSharing.sol +5 -0
  216. package/contracts/interfaces/ILooksStaking.sol +13 -0
  217. package/contracts/interfaces/IPActionAddRemoveLiq.sol +3 -5
  218. package/contracts/interfaces/IPActionMintRedeem.sol +2 -0
  219. package/contracts/interfaces/IPBulkSeller.sol +28 -0
  220. package/contracts/interfaces/IPBulkSellerFactory.sol +12 -0
  221. package/contracts/interfaces/IPBulkSellerSYCallback.sol +10 -0
  222. package/contracts/interfaces/IPMarketFactory.sol +1 -1
  223. package/contracts/interfaces/IPMsgSendEndpoint.sol +4 -2
  224. package/contracts/interfaces/IPYieldContractFactory.sol +1 -1
  225. package/contracts/interfaces/IStETH.sol +6 -0
  226. package/contracts/interfaces/IStandardizedYield.sol +15 -10
  227. package/contracts/offchain-helpers/BulkSellerOffchain.sol +43 -0
  228. package/contracts/offchain-helpers/MarketMathStatic.sol +0 -173
  229. package/contracts/offchain-helpers/RouterStatic.sol +189 -50
  230. package/contracts/router/ActionAddRemoveLiq.sol +71 -52
  231. package/contracts/router/ActionCallback.sol +4 -8
  232. package/contracts/router/ActionMintRedeem.sol +27 -18
  233. package/contracts/router/ActionSwapPT.sol +8 -9
  234. package/contracts/router/ActionSwapPTYT.sol +3 -7
  235. package/contracts/router/ActionSwapYT.sol +15 -10
  236. package/contracts/router/PendleRouter.sol +3 -0
  237. package/contracts/router/base/ActionBaseMintRedeem.sol +78 -83
  238. package/contracts/router/base/MarketApproxLib.sol +1 -1
  239. package/contracts/router/kyberswap/AggregationRouterHelper.sol +17 -1
  240. package/contracts/router/kyberswap/IAggregatorRouterHelper.sol +10 -0
  241. package/contracts/router/kyberswap/KyberSwapHelper.sol +21 -8
  242. package/deployments/1-markets/FRAX_30_MAR_23.json +8 -0
  243. package/deployments/1-markets/LOOKS_30_MAR_23.json +8 -0
  244. package/deployments/1-markets/USDD_MARCH_30.json +8 -0
  245. package/deployments/1-offchain-helper.json +3 -0
  246. package/package.json +3 -2
  247. package/typechain-types/AccessControl.ts +360 -0
  248. package/typechain-types/AccessControlUpgradeable.ts +369 -0
  249. package/typechain-types/ActionAddRemoveLiq.ts +64 -52
  250. package/typechain-types/ActionBaseMintRedeem.ts +8 -8
  251. package/typechain-types/ActionMintRedeem.ts +48 -16
  252. package/typechain-types/ActionSwapPT.ts +34 -12
  253. package/typechain-types/ActionSwapYT.ts +34 -12
  254. package/typechain-types/AggregationRouterHelper.ts +287 -3
  255. package/typechain-types/BaseSplitCodeFactoryContract.ts +9 -0
  256. package/typechain-types/BeaconProxy.ts +97 -0
  257. package/typechain-types/BoringOwnableUpgradeable.ts +9 -0
  258. package/typechain-types/BulkSeller.ts +777 -0
  259. package/typechain-types/BulkSellerFactory.ts +707 -0
  260. package/typechain-types/BulkSellerOffchain.ts +117 -0
  261. package/typechain-types/ContextUpgradeable.ts +68 -0
  262. package/typechain-types/Curve3CrvPoolHelper.ts +236 -0
  263. package/typechain-types/CurveFraxUsdcPoolHelper.ts +158 -0
  264. package/typechain-types/CurveUsdd3CrvPoolHelper.ts +184 -0
  265. package/typechain-types/ERC165.ts +102 -0
  266. package/typechain-types/ERC165Upgradeable.ts +113 -0
  267. package/typechain-types/IAccessControl.ts +305 -0
  268. package/typechain-types/IAccessControlUpgradeable.ts +305 -0
  269. package/typechain-types/IAggregationRouterHelper.ts +108 -0
  270. package/typechain-types/IBooster.ts +9 -3
  271. package/typechain-types/ICrvPool.ts +69 -172
  272. package/typechain-types/IERC165.ts +102 -0
  273. package/typechain-types/IERC165Upgradeable.ts +102 -0
  274. package/typechain-types/ILooksStaking.ts +27 -0
  275. package/typechain-types/IPActionAddRemoveLiq.ts +56 -44
  276. package/typechain-types/IPActionMintRedeem.ts +40 -8
  277. package/typechain-types/IPActionSwapPT.ts +26 -4
  278. package/typechain-types/IPActionSwapYT.ts +26 -4
  279. package/typechain-types/IPAllAction.ts +76 -54
  280. package/typechain-types/IPBulkSeller.ts +290 -0
  281. package/typechain-types/IPBulkSellerCallback.ts +115 -0
  282. package/typechain-types/IPBulkSellerFactory.ts +147 -0
  283. package/typechain-types/IPMarketFactory.ts +2 -2
  284. package/typechain-types/IPYieldContractFactory.ts +3 -3
  285. package/typechain-types/IStETH.ts +56 -0
  286. package/typechain-types/ITriCrvPool.ts +345 -0
  287. package/typechain-types/Initializable.ts +68 -0
  288. package/typechain-types/KyberSwapHelper.ts +8 -8
  289. package/typechain-types/MarketMathStatic.ts +0 -117
  290. package/typechain-types/PendleCurveFraxUsdcSY.ts +1228 -0
  291. package/typechain-types/PendleCurveUsdd3CrvSY.ts +1299 -0
  292. package/typechain-types/PendleFeeDistributor.ts +9 -0
  293. package/typechain-types/PendleFeeDistributorFactory.ts +9 -0
  294. package/typechain-types/PendleGaugeControllerBaseUpg.ts +9 -0
  295. package/typechain-types/PendleGaugeControllerMainchainUpg.ts +9 -0
  296. package/typechain-types/PendleGaugeControllerSidechainUpg.ts +9 -0
  297. package/typechain-types/PendleLooksStakingSY.ts +1052 -0
  298. package/typechain-types/PendleMarketFactory.ts +51 -2
  299. package/typechain-types/PendleMsgReceiveEndpointUpg.ts +9 -0
  300. package/typechain-types/PendleMsgSendEndpointUpg.ts +9 -0
  301. package/typechain-types/PendleMsgSenderAppUpg.ts +9 -0
  302. package/typechain-types/PendlePrincipalToken.ts +9 -0
  303. package/typechain-types/PendleRouter.ts +9 -0
  304. package/typechain-types/PendleVotingControllerUpg.ts +9 -0
  305. package/typechain-types/PendleYieldContractFactory.ts +57 -8
  306. package/typechain-types/PendleYieldToken.ts +21 -0
  307. package/typechain-types/ReentrancyGuardUpgradeable.ts +68 -0
  308. package/typechain-types/RouterStatic.ts +260 -22
  309. package/typechain-types/VotingEscrowPendleMainchain.ts +9 -0
  310. package/typechain-types/VotingEscrowPendleSidechain.ts +9 -0
  311. package/typechain-types/factories/AccessControlUpgradeable__factory.ts +247 -0
  312. package/typechain-types/factories/AccessControl__factory.ts +227 -0
  313. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +106 -59
  314. package/typechain-types/factories/ActionBaseMintRedeem__factory.ts +1 -1
  315. package/typechain-types/factories/ActionCallback__factory.ts +1 -1
  316. package/typechain-types/factories/ActionMintRedeem__factory.ts +65 -42
  317. package/typechain-types/factories/ActionMisc__factory.ts +1 -1
  318. package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
  319. package/typechain-types/factories/ActionSwapPT__factory.ts +35 -42
  320. package/typechain-types/factories/ActionSwapYT__factory.ts +35 -42
  321. package/typechain-types/factories/AggregationRouterHelper__factory.ts +190 -1
  322. package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +14 -1
  323. package/typechain-types/factories/BaseSplitCodeFactory__factory.ts +1 -1
  324. package/typechain-types/factories/BeaconProxy__factory.ts +141 -0
  325. package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
  326. package/typechain-types/factories/BoringOwnableUpgradeable__factory.ts +13 -0
  327. package/typechain-types/factories/BulkSellerFactory__factory.ts +568 -0
  328. package/typechain-types/factories/BulkSellerOffchain__factory.ts +88 -0
  329. package/typechain-types/factories/BulkSeller__factory.ts +749 -0
  330. package/typechain-types/factories/ContextUpgradeable__factory.ts +39 -0
  331. package/typechain-types/factories/Curve3CrvPoolHelper__factory.ts +220 -0
  332. package/typechain-types/factories/CurveFraxUsdcPoolHelper__factory.ts +146 -0
  333. package/typechain-types/factories/CurveUsdd3CrvPoolHelper__factory.ts +172 -0
  334. package/typechain-types/factories/ERC165Upgradeable__factory.ts +58 -0
  335. package/typechain-types/factories/ERC165__factory.ts +39 -0
  336. package/typechain-types/factories/ERC20__factory.ts +1 -1
  337. package/typechain-types/factories/Errors__factory.ts +283 -30
  338. package/typechain-types/factories/IAccessControlUpgradeable__factory.ts +202 -0
  339. package/typechain-types/factories/IAccessControl__factory.ts +198 -0
  340. package/typechain-types/factories/IAggregationRouterHelper__factory.ts +54 -0
  341. package/typechain-types/factories/IBooster__factory.ts +1 -1
  342. package/typechain-types/factories/ICrvPool__factory.ts +39 -85
  343. package/typechain-types/factories/IERC165Upgradeable__factory.ts +45 -0
  344. package/typechain-types/factories/IERC165__factory.ts +42 -0
  345. package/typechain-types/factories/ILooksStaking__factory.ts +7 -0
  346. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +91 -17
  347. package/typechain-types/factories/IPActionMintRedeem__factory.ts +50 -0
  348. package/typechain-types/factories/IPActionSwapPT__factory.ts +20 -0
  349. package/typechain-types/factories/IPActionSwapYT__factory.ts +20 -0
  350. package/typechain-types/factories/IPAllAction__factory.ts +181 -17
  351. package/typechain-types/factories/IPBulkSellerCallback__factory.ts +53 -0
  352. package/typechain-types/factories/IPBulkSellerFactory__factory.ts +101 -0
  353. package/typechain-types/factories/IPBulkSeller__factory.ts +185 -0
  354. package/typechain-types/factories/IPMarketFactory__factory.ts +2 -2
  355. package/typechain-types/factories/IPYieldContractFactory__factory.ts +1 -1
  356. package/typechain-types/factories/IStETH__factory.ts +45 -0
  357. package/typechain-types/factories/ITriCrvPool__factory.ts +225 -0
  358. package/typechain-types/factories/ImplicitSwapfeeContract__factory.ts +1 -1
  359. package/typechain-types/factories/Initializable__factory.ts +36 -0
  360. package/typechain-types/factories/KyberSwapHelper__factory.ts +1 -1
  361. package/typechain-types/factories/MarketMathStatic__factory.ts +1 -79
  362. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  363. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1068 -0
  364. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1133 -0
  365. package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
  366. package/typechain-types/factories/PendleERC20__factory.ts +1 -1
  367. package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +14 -1
  368. package/typechain-types/factories/PendleFeeDistributor__factory.ts +14 -1
  369. package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +13 -0
  370. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +14 -1
  371. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +14 -1
  372. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +937 -0
  373. package/typechain-types/factories/PendleMarketFactory__factory.ts +76 -16
  374. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  375. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +14 -1
  376. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +14 -1
  377. package/typechain-types/factories/PendleMsgSenderAppUpg__factory.ts +13 -0
  378. package/typechain-types/factories/PendlePrincipalToken__factory.ts +14 -1
  379. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  380. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  381. package/typechain-types/factories/PendleRouter__factory.ts +14 -1
  382. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +14 -1
  383. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  384. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +84 -3
  385. package/typechain-types/factories/PendleYieldToken__factory.ts +16 -3
  386. package/typechain-types/factories/ReentrancyGuardUpgradeable__factory.ts +43 -0
  387. package/typechain-types/factories/RouterStatic__factory.ts +216 -2
  388. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +14 -1
  389. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +14 -1
  390. package/typechain-types/hardhat.d.ts +233 -17
  391. package/typechain-types/index.ts +50 -6
  392. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.dbg.json +0 -4
  393. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.json +0 -1018
  394. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +0 -4
  395. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +0 -4
  396. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +0 -76
  397. package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.dbg.json +0 -4
  398. package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.json +0 -182
  399. package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol +0 -167
  400. package/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol +0 -83
  401. package/contracts/interfaces/ICelerMessageBus.sol +0 -28
  402. package/contracts/interfaces/ICelerMessageReceiverApp.sol +0 -25
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../../../../../build-info/51b5fae402f9fdbbcea890d46698c8cd.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../../../../build-info/ee5af12719eab717dabd15d68d1da819.json"
4
- }
@@ -1,76 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "Pendle3CrvHelper",
4
- "sourceName": "contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol",
5
- "abi": [
6
- {
7
- "inputs": [],
8
- "name": "DAI",
9
- "outputs": [
10
- {
11
- "internalType": "address",
12
- "name": "",
13
- "type": "address"
14
- }
15
- ],
16
- "stateMutability": "view",
17
- "type": "function"
18
- },
19
- {
20
- "inputs": [],
21
- "name": "LP",
22
- "outputs": [
23
- {
24
- "internalType": "address",
25
- "name": "",
26
- "type": "address"
27
- }
28
- ],
29
- "stateMutability": "view",
30
- "type": "function"
31
- },
32
- {
33
- "inputs": [],
34
- "name": "POOL",
35
- "outputs": [
36
- {
37
- "internalType": "address",
38
- "name": "",
39
- "type": "address"
40
- }
41
- ],
42
- "stateMutability": "view",
43
- "type": "function"
44
- },
45
- {
46
- "inputs": [],
47
- "name": "USDC",
48
- "outputs": [
49
- {
50
- "internalType": "address",
51
- "name": "",
52
- "type": "address"
53
- }
54
- ],
55
- "stateMutability": "view",
56
- "type": "function"
57
- },
58
- {
59
- "inputs": [],
60
- "name": "USDT",
61
- "outputs": [
62
- {
63
- "internalType": "address",
64
- "name": "",
65
- "type": "address"
66
- }
67
- ],
68
- "stateMutability": "view",
69
- "type": "function"
70
- }
71
- ],
72
- "bytecode": "0x61013461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe7300000000000000000000000000000000000000003014608060405260043610605b5760003560e01c80637535d24614606057806389a30271146096578063b6fccf8a1460b0578063c54e44eb1460ca578063e0bab4c41460e4575b600080fd5b607a73bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b6040516001600160a01b03909116815260200160405180910390f35b607a73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b607a736c3f90f043a72fa612cbac8115ee7e52bde6e49081565b607a73dac17f958d2ee523a2206206994597c13d831ec781565b607a736b175474e89094c44da98b954eedeac495271d0f8156fea264697066735822122043d73d998859be25d4dc2df67fa033a35b8ebb20dc45601848bba49b66ccf30664736f6c63430008110033",
73
- "deployedBytecode": "0x7300000000000000000000000000000000000000003014608060405260043610605b5760003560e01c80637535d24614606057806389a30271146096578063b6fccf8a1460b0578063c54e44eb1460ca578063e0bab4c41460e4575b600080fd5b607a73bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b6040516001600160a01b03909116815260200160405180910390f35b607a73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b607a736c3f90f043a72fa612cbac8115ee7e52bde6e49081565b607a73dac17f958d2ee523a2206206994597c13d831ec781565b607a736b175474e89094c44da98b954eedeac495271d0f8156fea264697066735822122043d73d998859be25d4dc2df67fa033a35b8ebb20dc45601848bba49b66ccf30664736f6c63430008110033",
74
- "linkReferences": {},
75
- "deployedLinkReferences": {}
76
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/51b5fae402f9fdbbcea890d46698c8cd.json"
4
- }
@@ -1,182 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "ImplicitSwapfeeContract",
4
- "sourceName": "contracts/offchain-helpers/ImplicitSwapfeeContract.sol",
5
- "abi": [
6
- {
7
- "inputs": [],
8
- "stateMutability": "nonpayable",
9
- "type": "constructor"
10
- },
11
- {
12
- "inputs": [
13
- {
14
- "internalType": "int256",
15
- "name": "exchangeRate",
16
- "type": "int256"
17
- }
18
- ],
19
- "name": "MarketExchangeRateBelowOne",
20
- "type": "error"
21
- },
22
- {
23
- "inputs": [],
24
- "name": "MarketExpired",
25
- "type": "error"
26
- },
27
- {
28
- "inputs": [
29
- {
30
- "internalType": "int256",
31
- "name": "currentAmount",
32
- "type": "int256"
33
- },
34
- {
35
- "internalType": "int256",
36
- "name": "requiredAmount",
37
- "type": "int256"
38
- }
39
- ],
40
- "name": "MarketInsufficientPtForTrade",
41
- "type": "error"
42
- },
43
- {
44
- "inputs": [],
45
- "name": "MarketProportionMustNotEqualOne",
46
- "type": "error"
47
- },
48
- {
49
- "inputs": [
50
- {
51
- "internalType": "int256",
52
- "name": "proportion",
53
- "type": "int256"
54
- },
55
- {
56
- "internalType": "int256",
57
- "name": "maxProportion",
58
- "type": "int256"
59
- }
60
- ],
61
- "name": "MarketProportionTooHigh",
62
- "type": "error"
63
- },
64
- {
65
- "inputs": [
66
- {
67
- "internalType": "int256",
68
- "name": "rateScalar",
69
- "type": "int256"
70
- }
71
- ],
72
- "name": "MarketRateScalarBelowZero",
73
- "type": "error"
74
- },
75
- {
76
- "inputs": [],
77
- "name": "MarketZeroLnImpliedRate",
78
- "type": "error"
79
- },
80
- {
81
- "inputs": [
82
- {
83
- "internalType": "int256",
84
- "name": "totalPt",
85
- "type": "int256"
86
- },
87
- {
88
- "internalType": "int256",
89
- "name": "totalAsset",
90
- "type": "int256"
91
- }
92
- ],
93
- "name": "MarketZeroTotalPtOrTotalAsset",
94
- "type": "error"
95
- },
96
- {
97
- "inputs": [
98
- {
99
- "internalType": "int256",
100
- "name": "K",
101
- "type": "int256"
102
- },
103
- {
104
- "internalType": "address",
105
- "name": "market",
106
- "type": "address"
107
- },
108
- {
109
- "components": [
110
- {
111
- "internalType": "int256",
112
- "name": "totalPt",
113
- "type": "int256"
114
- },
115
- {
116
- "internalType": "int256",
117
- "name": "totalSy",
118
- "type": "int256"
119
- },
120
- {
121
- "internalType": "int256",
122
- "name": "totalLp",
123
- "type": "int256"
124
- },
125
- {
126
- "internalType": "address",
127
- "name": "treasury",
128
- "type": "address"
129
- },
130
- {
131
- "internalType": "int256",
132
- "name": "scalarRoot",
133
- "type": "int256"
134
- },
135
- {
136
- "internalType": "uint256",
137
- "name": "lnFeeRateRoot",
138
- "type": "uint256"
139
- },
140
- {
141
- "internalType": "uint256",
142
- "name": "expiry",
143
- "type": "uint256"
144
- },
145
- {
146
- "internalType": "uint256",
147
- "name": "reserveFeePercent",
148
- "type": "uint256"
149
- },
150
- {
151
- "internalType": "uint256",
152
- "name": "lastLnImpliedRate",
153
- "type": "uint256"
154
- }
155
- ],
156
- "internalType": "struct MarketState",
157
- "name": "prevState",
158
- "type": "tuple"
159
- },
160
- {
161
- "internalType": "int256",
162
- "name": "netPtToAccount",
163
- "type": "int256"
164
- }
165
- ],
166
- "name": "execute",
167
- "outputs": [
168
- {
169
- "internalType": "int256",
170
- "name": "netScyToAccount",
171
- "type": "int256"
172
- }
173
- ],
174
- "stateMutability": "view",
175
- "type": "function"
176
- }
177
- ],
178
- "bytecode": "0x608060405234801561001057600080fd5b506115e3806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a2f3b98a14610030575b600080fd5b61004361003e366004611322565b610055565b60405190815260200160405180910390f35b600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ba91906113e2565b925050506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610122919061142f565b905060005b878112156101695760006101488361013f8b89611474565b89919042610174565b50905061015581866114a2565b94505080610162906114ca565b9050610127565b505050949350505050565b6000806101858660c001518461020f565b156101a35760405163b2094b5960e01b815260040160405180910390fd5b855184126101d6578551604051632185509b60e21b81526004810191909152602481018590526044015b60405180910390fd5b60006101e387878661021a565b90506101f187828888610323565b90935091506102058782888887878a610469565b5094509492505050565b808211155b92915050565b6102456040518060800160405280600081526020016000815260200160008152602001600081525090565b6102538460c001518361020f565b156102715760405163b2094b5960e01b815260040160405180910390fd5b6000828560c0015161028391906114e9565b905061028f85826104fb565b825260208501516102a190859061055c565b6020830152845115806102b657506020820151155b156102e4578451602083015160405163b1c4aefb60e01b8152600481019290925260248201526044016101cd565b6103028560000151866101000151846020015185600001518561059b565b604083015260a0850151610316908261061c565b6060830152509392505050565b6000806000610345876000015187602001518860000151896040015188610655565b9050600061035b6103568684610712565b610741565b606088015190915060008613156103ca5760006103788483610712565b9050670de0b6b3a76400008112156103a65760405163329e322960e21b8152600481018290526024016101cd565b6103c26103bb83670de0b6b3a76400006114fc565b849061074f565b9150506103f7565b6103f4816103e081670de0b6b3a76400006114fc565b6103ea9085611523565b6103569190611474565b90505b600060646104088b60e0015161076d565b6104129084611523565b61041c9190611474565b9050600061042a83856114fc565b9050600081126104435761043e8982610787565b61044d565b61044d89826107b4565b96506104598983610787565b9550505050505094509492505050565b6000818860c0015161047b91906114e9565b885190915061048a90866107e1565b88526104a461049984866114a2565b60208a0151906107e1565b6020890181905288516104c9916104bc90899061055c565b895160408b01518561082f565b61010089018190526000036104f157604051635534d70f60e11b815260040160405180910390fd5b5050505050505050565b60006105068261076d565b61051d6105186201518061016d611553565b61076d565b846080015161052c9190611523565b6105369190611474565b90506000811361021457604051630e520c3b60e11b8152600481018290526024016101cd565b6000806000831261056e576001610572565b6000195b90506105896105188561058486610887565b61089e565b6105939082611523565b949350505050565b6000806105a8868461061c565b9050670de0b6b3a76400008112156105d65760405163329e322960e21b8152600481018290526024016101cd565b60006105ec6105e5878a6114a2565b8990610712565b905060006105f9826108bd565b90506106058187610712565b61060f90846114fc565b9998505050505050505050565b60008061062e6201518061016d611553565b6106388486611553565b610642919061156a565b90506105936106508261076d565b610910565b60008061066287846107e1565b9050600061067a610673888a6114a2565b8390610712565b9050670d529ae9e86000008113156106b657604051637e34684f60e11b815260048101829052670d529ae9e860000060248201526044016101cd565b60006106c1826108bd565b9050856106ce8289610712565b6106d891906114a2565b9350670de0b6b3a76400008412156107065760405163329e322960e21b8152600481018590526024016101cd565b50505095945050505050565b600080610727670de0b6b3a764000085611523565b905082818161073857610738611448565b05949350505050565b600061021482600019611523565b60008061075c8385611523565b9050670de0b6b3a764000081610738565b60006001600160ff1b0382111561078357600080fd5b5090565b6000806000831261079957600161079d565b6000195b9050610589610518856107af86610887565b610d25565b600080600083126107c65760016107ca565b6000195b9050610589610518856107dc86610887565b610d3a565b60008183121561081e5760405162461bcd60e51b81526020600482015260086024820152676e6567617469766560c01b60448201526064016101cd565b61082882846114fc565b9392505050565b600080610840878787876000610655565b9050600061085561085083610d66565b610df7565b9050836108676201518061016d611553565b6108719083611553565b61087b919061156a565b98975050505050505050565b6000808213610783576108998261157e565b610214565b6000670de0b6b3a76400006108b38484611553565b610828919061156a565b6000670de0b6b3a764000082036108e75760405163a9c8b14d60e01b815260040160405180910390fd5b60006109056108fe84670de0b6b3a76400006114fc565b8490610712565b905061082881610d66565b6000680238fd42c5cf03ffff198212158015610935575068070c1cc73b00c800008213155b6109745760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b60448201526064016101cd565b60008212156109ac5761098982600003610910565b6a0c097ce7bc90715b34b9f160241b816109a5576109a5611448565b0592915050565b60006806f05b59d3b200000083126109ea57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610a20565b6803782dace9d90000008312610a1c57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610a20565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610a705768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610aac576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610ae657682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610b20576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610b5957680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610b925768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610bcb576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610c045768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b6000826108b3670de0b6b3a764000084611553565b600082600181610d52670de0b6b3a764000086611553565b610d5c919061159a565b6108b391906114e9565b6000808213610da75760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b60448201526064016101cd565b670c7d713b49da000082138015610dc55750670f43fc2c04ee000082125b15610de957670de0b6b3a7640000610ddc83610e06565b816109a5576109a5611448565b61021482610f25565b919050565b60008082121561078357600080fd5b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff1985010281610e4757610e47611448565b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f82050160020295945050505050565b6000670de0b6b3a7640000821215610f6657610f5d826a0c097ce7bc90715b34b9f160241b81610f5757610f57611448565b05610f25565b60000392915050565b6000775803bcc5cb9634ba4cfb2213f784019318ed4dcb6017880f60361b8312610fb15772195e54c5dd42177f53a27172fa9ec63026282760241b830592506806f05b59d3b2000000015b6f8bcc0026baae9e45e470190267a230cf60191b8312610fe8576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312611030576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a700831261106b576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf85083126110a257693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e283126110d957690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d03831261110e5768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261113957680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d831261116e576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f177578893793783126111a3576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b28660383126111d7576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac831261120b576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161123457611234611448565b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6001600160a01b03811681146112dd57600080fd5b50565b8035610df2816112c8565b60405161012081016001600160401b038111828210171561131c57634e487b7160e01b600052604160045260246000fd5b60405290565b60008060008084860361018081121561133a57600080fd5b85359450602086013561134c816112c8565b9350610120603f19820181131561136257600080fd5b61136a6112eb565b915060408701358252606087013560208301526080870135604083015261139360a088016112e0565b606083015260c0870135608083015260e087013560a08301526101008088013560c08401528188013560e084015261014088013581840152505080925050610160850135905092959194509250565b6000806000606084860312156113f757600080fd5b8351611402816112c8565b6020850151909350611413816112c8565b6040850151909250611424816112c8565b809150509250925092565b60006020828403121561144157600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261148357611483611448565b600160ff1b82146000198414161561149d5761149d61145e565b500590565b80820182811260008312801582168215821617156114c2576114c261145e565b505092915050565b60006001600160ff1b0182016114e2576114e261145e565b5060010190565b818103818111156102145761021461145e565b818103600083128015838313168383128216171561151c5761151c61145e565b5092915050565b80820260008212600160ff1b8414161561153f5761153f61145e565b81810583148215176102145761021461145e565b80820281158282048414176102145761021461145e565b60008261157957611579611448565b500490565b6000600160ff1b82016115935761159361145e565b5060000390565b808201808211156102145761021461145e56fea264697066735822122037cfbb6f657dec24a5e0145ef4d6ca79b897e1cc04855b868ef9b23b4fac9e0e64736f6c63430008110033",
179
- "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a2f3b98a14610030575b600080fd5b61004361003e366004611322565b610055565b60405190815260200160405180910390f35b600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ba91906113e2565b925050506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610122919061142f565b905060005b878112156101695760006101488361013f8b89611474565b89919042610174565b50905061015581866114a2565b94505080610162906114ca565b9050610127565b505050949350505050565b6000806101858660c001518461020f565b156101a35760405163b2094b5960e01b815260040160405180910390fd5b855184126101d6578551604051632185509b60e21b81526004810191909152602481018590526044015b60405180910390fd5b60006101e387878661021a565b90506101f187828888610323565b90935091506102058782888887878a610469565b5094509492505050565b808211155b92915050565b6102456040518060800160405280600081526020016000815260200160008152602001600081525090565b6102538460c001518361020f565b156102715760405163b2094b5960e01b815260040160405180910390fd5b6000828560c0015161028391906114e9565b905061028f85826104fb565b825260208501516102a190859061055c565b6020830152845115806102b657506020820151155b156102e4578451602083015160405163b1c4aefb60e01b8152600481019290925260248201526044016101cd565b6103028560000151866101000151846020015185600001518561059b565b604083015260a0850151610316908261061c565b6060830152509392505050565b6000806000610345876000015187602001518860000151896040015188610655565b9050600061035b6103568684610712565b610741565b606088015190915060008613156103ca5760006103788483610712565b9050670de0b6b3a76400008112156103a65760405163329e322960e21b8152600481018290526024016101cd565b6103c26103bb83670de0b6b3a76400006114fc565b849061074f565b9150506103f7565b6103f4816103e081670de0b6b3a76400006114fc565b6103ea9085611523565b6103569190611474565b90505b600060646104088b60e0015161076d565b6104129084611523565b61041c9190611474565b9050600061042a83856114fc565b9050600081126104435761043e8982610787565b61044d565b61044d89826107b4565b96506104598983610787565b9550505050505094509492505050565b6000818860c0015161047b91906114e9565b885190915061048a90866107e1565b88526104a461049984866114a2565b60208a0151906107e1565b6020890181905288516104c9916104bc90899061055c565b895160408b01518561082f565b61010089018190526000036104f157604051635534d70f60e11b815260040160405180910390fd5b5050505050505050565b60006105068261076d565b61051d6105186201518061016d611553565b61076d565b846080015161052c9190611523565b6105369190611474565b90506000811361021457604051630e520c3b60e11b8152600481018290526024016101cd565b6000806000831261056e576001610572565b6000195b90506105896105188561058486610887565b61089e565b6105939082611523565b949350505050565b6000806105a8868461061c565b9050670de0b6b3a76400008112156105d65760405163329e322960e21b8152600481018290526024016101cd565b60006105ec6105e5878a6114a2565b8990610712565b905060006105f9826108bd565b90506106058187610712565b61060f90846114fc565b9998505050505050505050565b60008061062e6201518061016d611553565b6106388486611553565b610642919061156a565b90506105936106508261076d565b610910565b60008061066287846107e1565b9050600061067a610673888a6114a2565b8390610712565b9050670d529ae9e86000008113156106b657604051637e34684f60e11b815260048101829052670d529ae9e860000060248201526044016101cd565b60006106c1826108bd565b9050856106ce8289610712565b6106d891906114a2565b9350670de0b6b3a76400008412156107065760405163329e322960e21b8152600481018590526024016101cd565b50505095945050505050565b600080610727670de0b6b3a764000085611523565b905082818161073857610738611448565b05949350505050565b600061021482600019611523565b60008061075c8385611523565b9050670de0b6b3a764000081610738565b60006001600160ff1b0382111561078357600080fd5b5090565b6000806000831261079957600161079d565b6000195b9050610589610518856107af86610887565b610d25565b600080600083126107c65760016107ca565b6000195b9050610589610518856107dc86610887565b610d3a565b60008183121561081e5760405162461bcd60e51b81526020600482015260086024820152676e6567617469766560c01b60448201526064016101cd565b61082882846114fc565b9392505050565b600080610840878787876000610655565b9050600061085561085083610d66565b610df7565b9050836108676201518061016d611553565b6108719083611553565b61087b919061156a565b98975050505050505050565b6000808213610783576108998261157e565b610214565b6000670de0b6b3a76400006108b38484611553565b610828919061156a565b6000670de0b6b3a764000082036108e75760405163a9c8b14d60e01b815260040160405180910390fd5b60006109056108fe84670de0b6b3a76400006114fc565b8490610712565b905061082881610d66565b6000680238fd42c5cf03ffff198212158015610935575068070c1cc73b00c800008213155b6109745760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b60448201526064016101cd565b60008212156109ac5761098982600003610910565b6a0c097ce7bc90715b34b9f160241b816109a5576109a5611448565b0592915050565b60006806f05b59d3b200000083126109ea57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610a20565b6803782dace9d90000008312610a1c57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610a20565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610a705768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610aac576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610ae657682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610b20576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610b5957680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610b925768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610bcb576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610c045768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b6000826108b3670de0b6b3a764000084611553565b600082600181610d52670de0b6b3a764000086611553565b610d5c919061159a565b6108b391906114e9565b6000808213610da75760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b60448201526064016101cd565b670c7d713b49da000082138015610dc55750670f43fc2c04ee000082125b15610de957670de0b6b3a7640000610ddc83610e06565b816109a5576109a5611448565b61021482610f25565b919050565b60008082121561078357600080fd5b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff1985010281610e4757610e47611448565b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f82050160020295945050505050565b6000670de0b6b3a7640000821215610f6657610f5d826a0c097ce7bc90715b34b9f160241b81610f5757610f57611448565b05610f25565b60000392915050565b6000775803bcc5cb9634ba4cfb2213f784019318ed4dcb6017880f60361b8312610fb15772195e54c5dd42177f53a27172fa9ec63026282760241b830592506806f05b59d3b2000000015b6f8bcc0026baae9e45e470190267a230cf60191b8312610fe8576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312611030576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a700831261106b576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf85083126110a257693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e283126110d957690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d03831261110e5768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261113957680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d831261116e576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f177578893793783126111a3576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b28660383126111d7576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac831261120b576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161123457611234611448565b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6001600160a01b03811681146112dd57600080fd5b50565b8035610df2816112c8565b60405161012081016001600160401b038111828210171561131c57634e487b7160e01b600052604160045260246000fd5b60405290565b60008060008084860361018081121561133a57600080fd5b85359450602086013561134c816112c8565b9350610120603f19820181131561136257600080fd5b61136a6112eb565b915060408701358252606087013560208301526080870135604083015261139360a088016112e0565b606083015260c0870135608083015260e087013560a08301526101008088013560c08401528188013560e084015261014088013581840152505080925050610160850135905092959194509250565b6000806000606084860312156113f757600080fd5b8351611402816112c8565b6020850151909350611413816112c8565b6040850151909250611424816112c8565b809150509250925092565b60006020828403121561144157600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261148357611483611448565b600160ff1b82146000198414161561149d5761149d61145e565b500590565b80820182811260008312801582168215821617156114c2576114c261145e565b505092915050565b60006001600160ff1b0182016114e2576114e261145e565b5060010190565b818103818111156102145761021461145e565b818103600083128015838313168383128216171561151c5761151c61145e565b5092915050565b80820260008212600160ff1b8414161561153f5761153f61145e565b81810583148215176102145761021461145e565b80820281158282048414176102145761021461145e565b60008261157957611579611448565b500490565b6000600160ff1b82016115935761159361145e565b5060000390565b808201808211156102145761021461145e56fea264697066735822122037cfbb6f657dec24a5e0145ef4d6ca79b897e1cc04855b868ef9b23b4fac9e0e64736f6c63430008110033",
180
- "linkReferences": {},
181
- "deployedLinkReferences": {}
182
- }
@@ -1,167 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity 0.8.17;
3
-
4
- import "./PendleConvexLPSY.sol";
5
- import "../Pendle3CrvHelper.sol";
6
- import "../../../../libraries/ArrayLib.sol";
7
-
8
- contract Pendle3CrvAndTokenSY is PendleConvexLPSY {
9
- using ArrayLib for address[];
10
-
11
- uint256 public immutable indexOf3Crv;
12
- uint256 public immutable indexOfOther;
13
- address public immutable otherToken;
14
-
15
- constructor(
16
- string memory _name,
17
- string memory _symbol,
18
- uint256 _cvxPid,
19
- address _crvLp,
20
- address _crvPool
21
- ) PendleConvexLPSY(_name, _symbol, _cvxPid, _crvLp, _crvPool) {
22
- indexOf3Crv = ICrvPool(_crvPool).coins(0) == Pendle3CrvHelper.LP ? 0 : 1;
23
- indexOfOther = 1 - indexOf3Crv;
24
- otherToken = ICrvPool(_crvPool).coins(indexOfOther);
25
-
26
- _safeApproveInf(Pendle3CrvHelper.LP, crvPool);
27
- _safeApproveInf(otherToken, crvPool);
28
-
29
- _safeApproveInf(Pendle3CrvHelper.DAI, Pendle3CrvHelper.POOL);
30
- _safeApproveInf(Pendle3CrvHelper.USDC, Pendle3CrvHelper.POOL);
31
- _safeApproveInf(Pendle3CrvHelper.USDT, Pendle3CrvHelper.POOL);
32
- }
33
-
34
- function _depositToCurve(address tokenIn, uint256 amountTokenToDeposit)
35
- internal
36
- virtual
37
- override
38
- returns (uint256 amountLpOut)
39
- {
40
- uint256 preBalanceLp = _selfBalance(crvLp);
41
-
42
- uint256[2] memory amounts;
43
-
44
- if (Pendle3CrvHelper.is3CrvToken(tokenIn)) {
45
- uint256 amount3CrvLp = Pendle3CrvHelper.deposit3Crv(tokenIn, amountTokenToDeposit);
46
- amounts[indexOf3Crv] = amount3CrvLp;
47
- } else {
48
- // one of the 2 LP
49
- amounts[_getIndex(tokenIn)] = amountTokenToDeposit;
50
- }
51
-
52
- ICrvPool(crvPool).add_liquidity(amounts, 0);
53
-
54
- amountLpOut = _selfBalance(crvLp) - preBalanceLp;
55
- }
56
-
57
- function _redeemFromCurve(address tokenOut, uint256 amountLpToRedeem)
58
- internal
59
- virtual
60
- override
61
- returns (uint256 amountTokenOut)
62
- {
63
- address tokenToRemove = (tokenOut == otherToken) ? otherToken : Pendle3CrvHelper.LP;
64
-
65
- uint256 preBalanceToken = _selfBalance(tokenToRemove);
66
-
67
- ICrvPool(crvPool).remove_liquidity_one_coin(
68
- amountLpToRedeem,
69
- Math.Int128(_getIndex(tokenToRemove)),
70
- 0
71
- );
72
-
73
- uint256 amountTokenRemoved = _selfBalance(tokenToRemove) - preBalanceToken;
74
-
75
- if (Pendle3CrvHelper.is3CrvToken(tokenOut)) {
76
- amountTokenOut = Pendle3CrvHelper.redeem3Crv(tokenOut, amountTokenRemoved);
77
- } else {
78
- // one of the 2 LP
79
- amountTokenOut = amountTokenRemoved;
80
- }
81
- }
82
-
83
- function _previewDepositToCurve(address tokenIn, uint256 amountTokenToDeposit)
84
- internal
85
- view
86
- virtual
87
- override
88
- returns (uint256)
89
- {
90
- uint256[2] memory amounts;
91
-
92
- if (Pendle3CrvHelper.is3CrvToken(tokenIn)) {
93
- uint256 amount3CrvLp = Pendle3CrvHelper.preview3CrvDeposit(
94
- tokenIn,
95
- amountTokenToDeposit
96
- );
97
- amounts[indexOf3Crv] = amount3CrvLp;
98
- } else {
99
- // one of the 2 LP
100
- amounts[_getIndex(tokenIn)] = amountTokenToDeposit;
101
- }
102
-
103
- return ICrvPool(crvPool).calc_token_amount(amounts, true);
104
- }
105
-
106
- function _previewRedeemFromCurve(address tokenOut, uint256 amountLpToRedeem)
107
- internal
108
- view
109
- virtual
110
- override
111
- returns (uint256)
112
- {
113
- uint256 amountTokenRemoved = ICrvPool(crvPool).calc_withdraw_one_coin(
114
- amountLpToRedeem,
115
- Math.Int128(_getIndex(tokenOut))
116
- );
117
-
118
- if (Pendle3CrvHelper.is3CrvToken(tokenOut)) {
119
- return Pendle3CrvHelper.preview3CrvRedeem(tokenOut, amountTokenRemoved);
120
- } else {
121
- // one of the 2 LP
122
- return amountTokenRemoved;
123
- }
124
- }
125
-
126
- function _getIndex(address token) internal view returns (uint256) {
127
- if (token == Pendle3CrvHelper.LP || Pendle3CrvHelper.is3CrvToken(token)) {
128
- return indexOf3Crv;
129
- } else {
130
- return indexOfOther;
131
- }
132
- }
133
-
134
- function getTokensIn() public view virtual override returns (address[] memory res) {
135
- res = new address[](6);
136
- res[0] = crvLp;
137
- res[1] = otherToken;
138
- res[2] = Pendle3CrvHelper.LP;
139
- res[3] = Pendle3CrvHelper.DAI;
140
- res[4] = Pendle3CrvHelper.USDC;
141
- res[5] = Pendle3CrvHelper.USDT;
142
- }
143
-
144
- function getTokensOut() public view virtual override returns (address[] memory res) {
145
- res = new address[](6);
146
- res[0] = crvLp;
147
- res[1] = otherToken;
148
- res[2] = Pendle3CrvHelper.LP;
149
- res[3] = Pendle3CrvHelper.DAI;
150
- res[4] = Pendle3CrvHelper.USDC;
151
- res[5] = Pendle3CrvHelper.USDT;
152
- }
153
-
154
- function isValidTokenIn(address token) public view virtual override returns (bool res) {
155
- res = (token == crvLp ||
156
- token == otherToken ||
157
- token == Pendle3CrvHelper.LP ||
158
- Pendle3CrvHelper.is3CrvToken(token));
159
- }
160
-
161
- function isValidTokenOut(address token) public view override returns (bool res) {
162
- res = (token == crvLp ||
163
- token == otherToken ||
164
- token == Pendle3CrvHelper.LP ||
165
- Pendle3CrvHelper.is3CrvToken(token));
166
- }
167
- }
@@ -1,83 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity 0.8.17;
3
-
4
- import "../../../../interfaces/Curve/ICrvPool.sol";
5
- import "../../../libraries/math/Math.sol";
6
- import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
7
-
8
- library Pendle3CrvHelper {
9
- using Math for uint256;
10
-
11
- address public constant LP = 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490;
12
- address public constant POOL = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7;
13
- address public constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
14
- address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
15
- address public constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
16
-
17
- function preview3CrvDeposit(address tokenIn, uint256 amountTokenToDeposit)
18
- internal
19
- view
20
- returns (uint256)
21
- {
22
- return
23
- ICrvPool(POOL).calc_token_amount(
24
- _getTokenAmounts(tokenIn, amountTokenToDeposit),
25
- true
26
- );
27
- }
28
-
29
- function preview3CrvRedeem(address tokenOut, uint256 amountSharesToRedeem)
30
- internal
31
- view
32
- returns (uint256)
33
- {
34
- return
35
- ICrvPool(POOL).calc_withdraw_one_coin(
36
- amountSharesToRedeem,
37
- _get3CrvTokenIndex(tokenOut).Int128()
38
- );
39
- }
40
-
41
- function deposit3Crv(address tokenIn, uint256 amountTokenToDeposit)
42
- internal
43
- returns (uint256)
44
- {
45
- uint256 balBefore = IERC20(LP).balanceOf(address(this));
46
- ICrvPool(POOL).add_liquidity(_getTokenAmounts(tokenIn, amountTokenToDeposit), 0);
47
- uint256 balAfter = IERC20(LP).balanceOf(address(this));
48
- return balAfter - balBefore;
49
- }
50
-
51
- function redeem3Crv(address tokenOut, uint256 amountSharesToRedeem)
52
- internal
53
- returns (uint256)
54
- {
55
- uint256 balBefore = IERC20(tokenOut).balanceOf(address(this));
56
- ICrvPool(POOL).remove_liquidity_one_coin(
57
- amountSharesToRedeem,
58
- _get3CrvTokenIndex(tokenOut).Int128(),
59
- 0
60
- );
61
- uint256 balAfter = IERC20(tokenOut).balanceOf(address(this));
62
- return balAfter - balBefore;
63
- }
64
-
65
- function _getTokenAmounts(address token, uint256 amount)
66
- internal
67
- pure
68
- returns (uint256[3] memory res)
69
- {
70
- res[_get3CrvTokenIndex(token)] = amount;
71
- }
72
-
73
- function _get3CrvTokenIndex(address token) internal pure returns (uint256) {
74
- if (token == DAI) return 0;
75
- if (token == USDC) return 1;
76
- if (token == USDT) return 2;
77
- revert("Pendle3CrvHelper: not valid token");
78
- }
79
-
80
- function is3CrvToken(address token) internal pure returns (bool) {
81
- return (token == DAI || token == USDC || token == USDT);
82
- }
83
- }
@@ -1,28 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-only
2
-
3
- pragma solidity >=0.8.0;
4
-
5
- interface ICelerMessageBus {
6
- /**
7
- * @notice Calculates the required fee for the message.
8
- * @param _message Arbitrary message bytes to be decoded by the destination app contract.
9
- @ @return The required fee.
10
- */
11
- function calcFee(bytes calldata _message) external view returns (uint256);
12
-
13
- /**
14
- * @notice Sends a message to a contract on another chain.
15
- * Sender needs to make sure the uniqueness of the message Id, which is computed as
16
- * hash(type.MessageOnly, sender, receiver, srcChainId, srcTxHash, dstChainId, message).
17
- * If messages with the same Id are sent, only one of them will succeed at dst chain..
18
- * A fee is charged in the native gas token.
19
- * @param _receiver The address of the destination app contract.
20
- * @param _dstChainId The destination chain ID.
21
- * @param _message Arbitrary message bytes to be decoded by the destination app contract.
22
- */
23
- function sendMessage(
24
- address _receiver,
25
- uint256 _dstChainId,
26
- bytes calldata _message
27
- ) external payable;
28
- }
@@ -1,25 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-only
2
-
3
- pragma solidity >=0.8.0;
4
-
5
- interface ICelerMessageReceiverApp {
6
- enum ExecutionStatus {
7
- Fail, // execution failed, finalized
8
- Success, // execution succeeded, finalized
9
- Retry // execution rejected, can retry later
10
- }
11
-
12
- /**
13
- * @notice Called by MessageBus (MessageBusReceiver)
14
- * @param _sender The address of the source app contract
15
- * @param _srcChainId The source chain ID where the transfer is originated from
16
- * @param _message Arbitrary message bytes originated from and encoded by the source app contract
17
- * @param _executor Address who called the MessageBus execution function
18
- */
19
- function executeMessage(
20
- address _sender,
21
- uint64 _srcChainId,
22
- bytes calldata _message,
23
- address _executor
24
- ) external payable returns (ExecutionStatus);
25
- }