@pendle/core-v2 0.15.3-mainnet → 0.16.0-testnet

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 (420) 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 +48 -110
  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 +21 -75
  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 +0 -39
  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 +2 -15
  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 +2 -15
  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 +0 -13
  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 +2 -15
  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 +2 -15
  19. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -46
  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 +8 -52
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -15
  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/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  36. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  38. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  39. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  41. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +17 -77
  43. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  44. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
  47. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  51. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  53. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.dbg.json +4 -0
  54. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.json +1018 -0
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +4 -0
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/{base → ConvexCurveLP}/PendleConvexLPSY.sol/PendleConvexLPSY.json +1 -1
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +4 -0
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +76 -0
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStaking.sol/PendleLooksStaking.dbg.json +4 -0
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/{PendleLooksStakingSY.sol/PendleLooksStakingSY.json → PendleLooksStaking.sol/PendleLooksStaking.json} +4 -4
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  63. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  64. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -15
  66. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +4 -85
  68. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  69. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +4 -17
  70. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  71. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
  72. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  73. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
  74. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  75. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +38 -3
  76. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  77. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
  78. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
  79. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.json +0 -13
  80. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  81. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.json +2 -2
  82. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +35 -319
  84. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  85. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
  86. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.json +1 -1
  87. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
  88. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.json +85 -39
  89. package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
  90. package/build/artifacts/contracts/interfaces/ICelerMessageBus.sol/ICelerMessageBus.dbg.json +4 -0
  91. package/build/artifacts/contracts/interfaces/ICelerMessageBus.sol/ICelerMessageBus.json +53 -0
  92. package/build/artifacts/contracts/interfaces/ICelerMessageReceiverApp.sol/ICelerMessageReceiverApp.dbg.json +4 -0
  93. package/build/artifacts/contracts/interfaces/ICelerMessageReceiverApp.sol/ICelerMessageReceiverApp.json +45 -0
  94. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  95. package/build/artifacts/contracts/interfaces/ILooksFeeSharing.sol/ILooksFeeSharing.dbg.json +1 -1
  96. package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.dbg.json +1 -1
  97. package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.json +0 -7
  98. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  99. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +17 -91
  100. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
  101. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +0 -50
  102. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  103. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +0 -20
  104. package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
  105. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +0 -20
  107. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  108. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +17 -181
  109. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.json +2 -2
  112. package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
  113. package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.json +2 -12
  114. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  121. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  122. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  123. package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +1 -1
  124. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
  125. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.json +0 -45
  126. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  127. package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +1 -1
  128. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  129. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  130. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -15
  131. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
  132. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +80 -2
  133. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
  134. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +60 -299
  135. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  136. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +41 -118
  137. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  138. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
  139. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
  140. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +24 -61
  141. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
  142. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
  143. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  144. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +24 -31
  145. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
  146. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
  147. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  148. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +24 -31
  149. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  150. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -15
  151. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
  152. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json +1 -1
  153. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  154. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  155. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  156. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  157. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
  158. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +2 -191
  159. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
  160. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.json +1 -1
  161. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +1 -1
  162. package/contracts/core/Market/PendleMarket.sol +7 -18
  163. package/contracts/core/Market/PendleMarketFactory.sol +5 -15
  164. package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol +167 -0
  165. package/contracts/core/StandardizedYield/implementations/Convex/{base → ConvexCurveLP}/PendleConvexLPSY.sol +4 -2
  166. package/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol +83 -0
  167. package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +4 -19
  168. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
  169. package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +7 -21
  170. package/contracts/core/YieldContracts/PendleYieldToken.sol +21 -54
  171. package/contracts/core/erc20/PendleERC20.sol +7 -4
  172. package/contracts/core/libraries/BaseSplitCodeFactory.sol +1 -1
  173. package/contracts/core/libraries/BoringOwnableUpgradeable.sol +1 -1
  174. package/contracts/core/libraries/Errors.sol +2 -28
  175. package/contracts/core/libraries/TokenHelper.sol +0 -9
  176. package/contracts/interfaces/ConvexCurve/IBooster.sol +1 -1
  177. package/contracts/interfaces/Curve/ICrvPool.sol +31 -12
  178. package/contracts/interfaces/IPActionAddRemoveLiq.sol +5 -3
  179. package/contracts/interfaces/IPActionMintRedeem.sol +0 -2
  180. package/contracts/interfaces/IPMarketFactory.sol +1 -1
  181. package/contracts/interfaces/IPYieldContractFactory.sol +1 -1
  182. package/contracts/interfaces/IStETH.sol +0 -6
  183. package/contracts/interfaces/IStandardizedYield.sol +10 -15
  184. package/contracts/offchain-helpers/ImplicitSwapfeeContract.sol +30 -0
  185. package/contracts/offchain-helpers/MarketMathStatic.sol +173 -0
  186. package/contracts/offchain-helpers/RouterStatic.sol +50 -189
  187. package/contracts/router/ActionAddRemoveLiq.sol +52 -71
  188. package/contracts/router/ActionCallback.sol +8 -4
  189. package/contracts/router/ActionMintRedeem.sol +18 -27
  190. package/contracts/router/ActionSwapPT.sol +9 -8
  191. package/contracts/router/ActionSwapPTYT.sol +7 -3
  192. package/contracts/router/ActionSwapYT.sol +10 -15
  193. package/contracts/router/PendleRouter.sol +0 -3
  194. package/contracts/router/base/ActionBaseMintRedeem.sol +83 -78
  195. package/contracts/router/base/MarketApproxLib.sol +1 -1
  196. package/contracts/router/kyberswap/AggregationRouterHelper.sol +1 -17
  197. package/contracts/router/kyberswap/KyberSwapHelper.sol +8 -21
  198. package/deployments/43113-core.json +16 -0
  199. package/deployments/43113-helper.json +3 -0
  200. package/deployments/43113-markets/benqi-market-QI-USDC-FEB-2ND.json +8 -0
  201. package/deployments/43113-markets/benqi-market-QI-WETH-DEC-1ST.json +8 -0
  202. package/deployments/43113-testenv.json +22 -0
  203. package/deployments/80001-core.json +15 -0
  204. package/deployments/80001-markets/benqi-market-QI-USDC-FEB-2ND.json +8 -0
  205. package/deployments/80001-markets/benqi-market-QI-WETH-DEC-1ST.json +8 -0
  206. package/deployments/80001-testenv.json +22 -0
  207. package/package.json +2 -3
  208. package/typechain-types/ActionAddRemoveLiq.ts +52 -64
  209. package/typechain-types/ActionBaseMintRedeem.ts +8 -8
  210. package/typechain-types/ActionMintRedeem.ts +16 -48
  211. package/typechain-types/ActionSwapPT.ts +12 -34
  212. package/typechain-types/ActionSwapYT.ts +12 -34
  213. package/typechain-types/AggregationRouterHelper.ts +3 -287
  214. package/typechain-types/BaseSplitCodeFactoryContract.ts +0 -9
  215. package/typechain-types/BoringOwnableUpgradeable.ts +0 -9
  216. package/typechain-types/IBooster.ts +3 -9
  217. package/typechain-types/ICrvPool.ts +172 -69
  218. package/typechain-types/ILooksStaking.ts +0 -27
  219. package/typechain-types/IPActionAddRemoveLiq.ts +44 -56
  220. package/typechain-types/IPActionMintRedeem.ts +8 -40
  221. package/typechain-types/IPActionSwapPT.ts +4 -26
  222. package/typechain-types/IPActionSwapYT.ts +4 -26
  223. package/typechain-types/IPAllAction.ts +54 -76
  224. package/typechain-types/IPMarketFactory.ts +2 -2
  225. package/typechain-types/IPMsgSendEndpoint.ts +14 -24
  226. package/typechain-types/IPYieldContractFactory.ts +3 -3
  227. package/typechain-types/IStETH.ts +0 -56
  228. package/typechain-types/ImplicitSwapfeeContract.ts +17 -9
  229. package/typechain-types/KyberSwapHelper.ts +8 -8
  230. package/typechain-types/MarketMathStatic.ts +117 -0
  231. package/typechain-types/PendleFeeDistributor.ts +0 -9
  232. package/typechain-types/PendleFeeDistributorFactory.ts +0 -9
  233. package/typechain-types/PendleGaugeControllerBaseUpg.ts +0 -9
  234. package/typechain-types/PendleGaugeControllerMainchainUpg.ts +0 -9
  235. package/typechain-types/PendleGaugeControllerSidechainUpg.ts +0 -9
  236. package/typechain-types/PendleMarketFactory.ts +2 -51
  237. package/typechain-types/PendleMsgReceiveEndpointUpg.ts +68 -135
  238. package/typechain-types/PendleMsgSendEndpointUpg.ts +39 -108
  239. package/typechain-types/PendleMsgSenderAppUpg.ts +0 -64
  240. package/typechain-types/PendlePrincipalToken.ts +0 -9
  241. package/typechain-types/PendleRouter.ts +0 -9
  242. package/typechain-types/PendleVotingControllerUpg.ts +0 -64
  243. package/typechain-types/PendleYieldContractFactory.ts +8 -57
  244. package/typechain-types/PendleYieldToken.ts +0 -21
  245. package/typechain-types/RouterStatic.ts +20 -302
  246. package/typechain-types/VotingEscrowPendleMainchain.ts +6 -70
  247. package/typechain-types/VotingEscrowPendleSidechain.ts +0 -9
  248. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +59 -122
  249. package/typechain-types/factories/ActionBaseMintRedeem__factory.ts +1 -1
  250. package/typechain-types/factories/ActionCallback__factory.ts +1 -1
  251. package/typechain-types/factories/ActionMintRedeem__factory.ts +42 -65
  252. package/typechain-types/factories/ActionMisc__factory.ts +1 -1
  253. package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
  254. package/typechain-types/factories/ActionSwapPT__factory.ts +42 -35
  255. package/typechain-types/factories/ActionSwapYT__factory.ts +42 -35
  256. package/typechain-types/factories/AggregationRouterHelper__factory.ts +1 -190
  257. package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -14
  258. package/typechain-types/factories/BaseSplitCodeFactory__factory.ts +1 -1
  259. package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
  260. package/typechain-types/factories/BoringOwnableUpgradeable__factory.ts +0 -13
  261. package/typechain-types/factories/ERC20__factory.ts +1 -1
  262. package/typechain-types/factories/Errors__factory.ts +34 -318
  263. package/typechain-types/factories/IBooster__factory.ts +1 -1
  264. package/typechain-types/factories/ICrvPool__factory.ts +85 -39
  265. package/typechain-types/factories/ILooksStaking__factory.ts +0 -7
  266. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +17 -91
  267. package/typechain-types/factories/IPActionMintRedeem__factory.ts +0 -50
  268. package/typechain-types/factories/IPActionSwapPT__factory.ts +0 -20
  269. package/typechain-types/factories/IPActionSwapYT__factory.ts +0 -20
  270. package/typechain-types/factories/IPAllAction__factory.ts +17 -181
  271. package/typechain-types/factories/IPMarketFactory__factory.ts +2 -2
  272. package/typechain-types/factories/IPMsgSendEndpoint__factory.ts +2 -12
  273. package/typechain-types/factories/IPYieldContractFactory__factory.ts +1 -1
  274. package/typechain-types/factories/IStETH__factory.ts +0 -45
  275. package/typechain-types/factories/ImplicitSwapfeeContract__factory.ts +12 -4
  276. package/typechain-types/factories/KyberSwapHelper__factory.ts +1 -1
  277. package/typechain-types/factories/MarketMathStatic__factory.ts +79 -1
  278. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  279. package/typechain-types/factories/Pendle3CrvAndTokenSY__factory.ts +1 -1
  280. package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
  281. package/typechain-types/factories/PendleERC20__factory.ts +1 -1
  282. package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -14
  283. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -14
  284. package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +0 -13
  285. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -14
  286. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -14
  287. package/typechain-types/factories/PendleMarketFactory__factory.ts +16 -76
  288. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  289. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +51 -113
  290. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +23 -84
  291. package/typechain-types/factories/PendleMsgSenderAppUpg__factory.ts +0 -39
  292. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -14
  293. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  294. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  295. package/typechain-types/factories/PendleRouter__factory.ts +1 -14
  296. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +2 -57
  297. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  298. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +3 -84
  299. package/typechain-types/factories/PendleYieldToken__factory.ts +3 -16
  300. package/typechain-types/factories/RouterStatic__factory.ts +1 -244
  301. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +8 -63
  302. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -14
  303. package/typechain-types/hardhat.d.ts +39 -219
  304. package/typechain-types/index.ts +12 -48
  305. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +0 -4
  306. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +0 -10
  307. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +0 -4
  308. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +0 -10
  309. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +0 -4
  310. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +0 -699
  311. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +0 -4
  312. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +0 -515
  313. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +0 -4
  314. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +0 -10
  315. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +0 -4
  316. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +0 -1003
  317. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +0 -4
  318. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +0 -1068
  319. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +0 -4
  320. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.json +0 -10
  321. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +0 -4
  322. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +0 -10
  323. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +0 -4
  324. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.json +0 -10
  325. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +0 -4
  326. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +0 -4
  327. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +0 -4
  328. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.json +0 -213
  329. package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +0 -4
  330. package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.json +0 -119
  331. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +0 -4
  332. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.json +0 -39
  333. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +0 -4
  334. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.json +0 -173
  335. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +0 -4
  336. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.json +0 -86
  337. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +0 -4
  338. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.json +0 -34
  339. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +0 -4
  340. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +0 -35
  341. package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.dbg.json +0 -4
  342. package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.json +0 -35
  343. package/contracts/core/BulkSeller/BulkSeller.sol +0 -259
  344. package/contracts/core/BulkSeller/BulkSellerFactory.sol +0 -88
  345. package/contracts/core/BulkSeller/BulkSellerMathCore.sol +0 -143
  346. package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +0 -102
  347. package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +0 -160
  348. package/contracts/core/StandardizedYield/implementations/Convex/README.md +0 -29
  349. package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +0 -215
  350. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +0 -127
  351. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +0 -152
  352. package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +0 -122
  353. package/contracts/interfaces/Curve/ITriCrvPool.sol +0 -41
  354. package/contracts/interfaces/ILooksFeeSharing.sol +0 -5
  355. package/contracts/interfaces/ILooksStaking.sol +0 -13
  356. package/contracts/interfaces/IPBulkSeller.sol +0 -28
  357. package/contracts/interfaces/IPBulkSellerFactory.sol +0 -12
  358. package/contracts/interfaces/IPBulkSellerSYCallback.sol +0 -10
  359. package/contracts/offchain-helpers/BulkSellerOffchain.sol +0 -43
  360. package/contracts/router/kyberswap/IAggregatorRouterHelper.sol +0 -10
  361. package/deployments/1-core.json +0 -17
  362. package/deployments/1-markets/FRAX_30_MAR_23.json +0 -9
  363. package/deployments/1-markets/LOOKS_30_MAR_23.json +0 -8
  364. package/deployments/1-markets/STETH_MARCH_30.json +0 -8
  365. package/deployments/1-markets/USDD_MARCH_30.json +0 -9
  366. package/deployments/1-offchain-helper.json +0 -3
  367. package/typechain-types/AccessControl.ts +0 -360
  368. package/typechain-types/AccessControlUpgradeable.ts +0 -369
  369. package/typechain-types/BeaconProxy.ts +0 -97
  370. package/typechain-types/BulkSeller.ts +0 -777
  371. package/typechain-types/BulkSellerFactory.ts +0 -707
  372. package/typechain-types/BulkSellerOffchain.ts +0 -117
  373. package/typechain-types/ContextUpgradeable.ts +0 -68
  374. package/typechain-types/Curve3CrvPoolHelper.ts +0 -236
  375. package/typechain-types/CurveFraxUsdcPoolHelper.ts +0 -158
  376. package/typechain-types/CurveUsdd3CrvPoolHelper.ts +0 -184
  377. package/typechain-types/ERC165.ts +0 -102
  378. package/typechain-types/ERC165Upgradeable.ts +0 -113
  379. package/typechain-types/IAccessControl.ts +0 -305
  380. package/typechain-types/IAccessControlUpgradeable.ts +0 -305
  381. package/typechain-types/IAggregationRouterHelper.ts +0 -108
  382. package/typechain-types/IERC165.ts +0 -102
  383. package/typechain-types/IERC165Upgradeable.ts +0 -102
  384. package/typechain-types/IPBulkSeller.ts +0 -290
  385. package/typechain-types/IPBulkSellerCallback.ts +0 -115
  386. package/typechain-types/IPBulkSellerFactory.ts +0 -147
  387. package/typechain-types/ITriCrvPool.ts +0 -345
  388. package/typechain-types/Initializable.ts +0 -68
  389. package/typechain-types/PendleConvex2TokensSY.ts +0 -1215
  390. package/typechain-types/PendleCurveFraxUsdcSY.ts +0 -1228
  391. package/typechain-types/PendleCurveUsdd3CrvSY.ts +0 -1299
  392. package/typechain-types/PendleLooksStakingSY.ts +0 -1052
  393. package/typechain-types/ReentrancyGuardUpgradeable.ts +0 -68
  394. package/typechain-types/factories/AccessControlUpgradeable__factory.ts +0 -247
  395. package/typechain-types/factories/AccessControl__factory.ts +0 -227
  396. package/typechain-types/factories/BeaconProxy__factory.ts +0 -141
  397. package/typechain-types/factories/BulkSellerFactory__factory.ts +0 -568
  398. package/typechain-types/factories/BulkSellerOffchain__factory.ts +0 -88
  399. package/typechain-types/factories/BulkSeller__factory.ts +0 -749
  400. package/typechain-types/factories/ContextUpgradeable__factory.ts +0 -39
  401. package/typechain-types/factories/Curve3CrvPoolHelper__factory.ts +0 -220
  402. package/typechain-types/factories/CurveFraxUsdcPoolHelper__factory.ts +0 -146
  403. package/typechain-types/factories/CurveUsdd3CrvPoolHelper__factory.ts +0 -172
  404. package/typechain-types/factories/ERC165Upgradeable__factory.ts +0 -58
  405. package/typechain-types/factories/ERC165__factory.ts +0 -39
  406. package/typechain-types/factories/IAccessControlUpgradeable__factory.ts +0 -202
  407. package/typechain-types/factories/IAccessControl__factory.ts +0 -198
  408. package/typechain-types/factories/IAggregationRouterHelper__factory.ts +0 -54
  409. package/typechain-types/factories/IERC165Upgradeable__factory.ts +0 -45
  410. package/typechain-types/factories/IERC165__factory.ts +0 -42
  411. package/typechain-types/factories/IPBulkSellerCallback__factory.ts +0 -53
  412. package/typechain-types/factories/IPBulkSellerFactory__factory.ts +0 -101
  413. package/typechain-types/factories/IPBulkSeller__factory.ts +0 -185
  414. package/typechain-types/factories/ITriCrvPool__factory.ts +0 -225
  415. package/typechain-types/factories/Initializable__factory.ts +0 -36
  416. package/typechain-types/factories/PendleConvex2TokensSY__factory.ts +0 -1093
  417. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +0 -1068
  418. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +0 -1133
  419. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +0 -937
  420. package/typechain-types/factories/ReentrancyGuardUpgradeable__factory.ts +0 -43
@@ -0,0 +1,167 @@
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
+ }
@@ -143,10 +143,12 @@ abstract contract PendleConvexLPSY is SYBaseWithRewards {
143
143
  override
144
144
  returns (uint256 amountTokenOut)
145
145
  {
146
+ uint256 amountLpTokenToReceive = (amountSharesToRedeem * exchangeRate()) / 1e18;
147
+
146
148
  if (tokenOut == crvLp) {
147
- amountTokenOut = amountSharesToRedeem;
149
+ amountTokenOut = amountLpTokenToReceive;
148
150
  } else {
149
- amountTokenOut = _previewRedeemFromCurve(tokenOut, amountSharesToRedeem);
151
+ amountTokenOut = _previewRedeemFromCurve(tokenOut, amountLpTokenToReceive);
150
152
  }
151
153
  }
152
154
 
@@ -0,0 +1,83 @@
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
+ }
@@ -50,10 +50,9 @@ contract PendleWstEthSY is SYBase {
50
50
  } else {
51
51
  if (tokenIn == wETH) IWETH(wETH).withdraw(amountDeposited);
52
52
 
53
- uint256 amountStEthSharesOut = IStETH(stETH).submit{ value: amountDeposited }(
54
- address(0)
55
- );
56
- amountStETH = IStETH(stETH).getPooledEthByShares(amountStEthSharesOut);
53
+ uint256 preBalanceStEth = _selfBalance(stETH);
54
+ IStETH(stETH).submit{ value: amountDeposited }(address(0));
55
+ amountStETH = _selfBalance(stETH) - preBalanceStEth;
57
56
  }
58
57
  amountSharesOut = IWstETH(wstETH).wrap(amountStETH);
59
58
  }
@@ -102,21 +101,7 @@ contract PendleWstEthSY is SYBase {
102
101
  {
103
102
  if (tokenIn == wstETH) amountSharesOut = amountTokenToDeposit;
104
103
  else {
105
- if (tokenIn != stETH) {
106
- uint256 totalShares = IStETH(stETH).getTotalShares();
107
- uint256 totalPooledEth = IStETH(stETH).getTotalPooledEther();
108
- uint256 amountStEthSharesOut = IStETH(stETH).getSharesByPooledEth(
109
- amountTokenToDeposit
110
- );
111
-
112
- totalShares += amountStEthSharesOut;
113
- totalPooledEth += amountTokenToDeposit;
114
-
115
- uint256 stEthBalance = (amountStEthSharesOut * totalPooledEth) / totalShares;
116
- amountSharesOut = (stEthBalance * totalShares) / totalPooledEth;
117
- } else {
118
- amountSharesOut = IStETH(stETH).getSharesByPooledEth(amountTokenToDeposit);
119
- }
104
+ amountSharesOut = IStETH(stETH).getSharesByPooledEth(amountTokenToDeposit);
120
105
  }
121
106
  }
122
107
 
@@ -9,7 +9,7 @@ import "../libraries/Errors.sol";
9
9
 
10
10
  import "../erc20/PendleERC20Permit.sol";
11
11
 
12
- import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
12
+ import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
13
13
 
14
14
  contract PendlePrincipalToken is PendleERC20Permit, Initializable, IPPrincipalToken {
15
15
  address public immutable SY;
@@ -22,7 +22,7 @@ contract PendlePrincipalToken is PendleERC20Permit, Initializable, IPPrincipalTo
22
22
  _;
23
23
  }
24
24
 
25
- modifier onlyYieldFactory() {
25
+ modifier onlYieldFactory() {
26
26
  if (msg.sender != factory) revert Errors.OnlyYCFactory();
27
27
  _;
28
28
  }
@@ -39,7 +39,7 @@ contract PendlePrincipalToken is PendleERC20Permit, Initializable, IPPrincipalTo
39
39
  factory = msg.sender;
40
40
  }
41
41
 
42
- function initialize(address _YT) external initializer onlyYieldFactory {
42
+ function initialize(address _YT) external initializer onlYieldFactory {
43
43
  YT = _YT;
44
44
  }
45
45
 
@@ -62,15 +62,11 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
62
62
  uint96 public expiryDivisor;
63
63
 
64
64
  // SY => expiry => address
65
- // returns address(0) if not created
66
65
  mapping(address => mapping(uint256 => address)) public getPT;
67
66
  mapping(address => mapping(uint256 => address)) public getYT;
68
67
  mapping(address => bool) public isPT;
69
68
  mapping(address => bool) public isYT;
70
69
 
71
- uint256 public constant maxInterestFeeRate = 2e17; // 20%
72
- uint256 public constant maxRewardFeeRate = 2e17; // 20%
73
-
74
70
  constructor(
75
71
  address _ytCreationCodeContractA,
76
72
  uint256 _ytCreationCodeSizeA,
@@ -100,10 +96,10 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
100
96
  * @notice Create a pair of (PT, YT) from any SY and valid expiry. Anyone can create a yield contract
101
97
  * @dev It's intentional to make expiry an uint32 to guard against fat fingers. uint32.max is year 2106
102
98
  */
103
- function createYieldContract(
104
- address SY,
105
- uint32 expiry
106
- ) external returns (address PT, address YT) {
99
+ function createYieldContract(address SY, uint32 expiry)
100
+ external
101
+ returns (address PT, address YT)
102
+ {
107
103
  if (MiniHelpers.isTimeInThePast(expiry) || expiry % expiryDivisor != 0)
108
104
  revert Errors.YCFactoryInvalidExpiry();
109
105
 
@@ -159,31 +155,21 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
159
155
  }
160
156
 
161
157
  function setExpiryDivisor(uint96 newExpiryDivisor) public onlyOwner {
162
- if (newExpiryDivisor == 0) revert Errors.YCFactoryZeroExpiryDivisor();
163
-
164
158
  expiryDivisor = newExpiryDivisor;
165
159
  emit SetExpiryDivisor(newExpiryDivisor);
166
160
  }
167
161
 
168
162
  function setInterestFeeRate(uint128 newInterestFeeRate) public onlyOwner {
169
- if (newInterestFeeRate > maxInterestFeeRate)
170
- revert Errors.YCFactoryInterestFeeRateTooHigh(newInterestFeeRate, maxInterestFeeRate);
171
-
172
163
  interestFeeRate = newInterestFeeRate;
173
164
  emit SetInterestFeeRate(newInterestFeeRate);
174
165
  }
175
166
 
176
- function setRewardFeeRate(uint128 newRewardFeeRate) public onlyOwner {
177
- if (newRewardFeeRate > maxRewardFeeRate)
178
- revert Errors.YCFactoryRewardFeeRateTooHigh(newRewardFeeRate, maxRewardFeeRate);
179
-
180
- rewardFeeRate = newRewardFeeRate;
181
- emit SetRewardFeeRate(newRewardFeeRate);
167
+ function setRewardFeeRate(uint128 newInterestFeeRate) public onlyOwner {
168
+ rewardFeeRate = newInterestFeeRate;
169
+ emit SetInterestFeeRate(newInterestFeeRate);
182
170
  }
183
171
 
184
172
  function setTreasury(address newTreasury) public onlyOwner {
185
- if (newTreasury == address(0)) revert Errors.YCFactoryZeroTreasury();
186
-
187
173
  treasury = newTreasury;
188
174
  emit SetTreasury(newTreasury);
189
175
  }
@@ -45,9 +45,7 @@ contract PendleYieldToken is
45
45
  address public immutable factory;
46
46
  uint256 public immutable expiry;
47
47
 
48
- uint256 public syReserve;
49
-
50
- uint128 public pyIndexLastUpdatedBlock;
48
+ uint128 public syReserve;
51
49
  uint128 internal _pyIndexStored;
52
50
 
53
51
  PostExpiryData public postExpiry;
@@ -63,9 +61,6 @@ contract PendleYieldToken is
63
61
  _;
64
62
  }
65
63
 
66
- /**
67
- * for all txs within the same block. Otherwise, the PY index is recalculated for every tx.
68
- */
69
64
  constructor(
70
65
  address _SY,
71
66
  address _PT,
@@ -80,10 +75,7 @@ contract PendleYieldToken is
80
75
  factory = msg.sender;
81
76
  }
82
77
 
83
- /**
84
- * @notice Tokenize SY into PT + YT of equal qty. Every unit of underlying of SY will create 1 PT + 1 YT
85
- * @dev SY should be transferred directly into this contract prior to calling this function
86
- */
78
+ /// @notice Tokenize SY into PT + YT of equal qty. Every unit of underlying of SY will create 1 PT + 1 YT
87
79
  function mintPY(address receiverPT, address receiverYT)
88
80
  external
89
81
  nonReentrant
@@ -105,7 +97,7 @@ contract PendleYieldToken is
105
97
  amountPYOut = amountPYOuts[0];
106
98
  }
107
99
 
108
- /// @notice Tokenize SY into PT + YT for multiple receivers. See `mintPY()` for more details
100
+ /// @notice Tokenize SY into PT + YT of equal qty. Every unit of underlying of SY will create 1 PT + 1 YT
109
101
  function mintPYMulti(
110
102
  address[] calldata receiverPTs,
111
103
  address[] calldata receiverYTs,
@@ -124,10 +116,7 @@ contract PendleYieldToken is
124
116
  amountPYOuts = _mintPY(receiverPTs, receiverYTs, amountSyToMints);
125
117
  }
126
118
 
127
- /**
128
- * @notice Converts PY tokens into SY, but interests & rewards are not redeemed at the same time
129
- * @dev PT/YT tokens should be transferred into this contract prior to redeeming
130
- */
119
+ /// @dev this function converts PY tokens into sy, but interests & rewards are not redeemed at the same time
131
120
  function redeemPY(address receiver)
132
121
  external
133
122
  nonReentrant
@@ -144,10 +133,9 @@ contract PendleYieldToken is
144
133
  amountSyOut = amountSyOuts[0];
145
134
  }
146
135
 
147
- /**
148
- * @notice Converts PY tokens into SY for multiple receivers. See (`redeemPY`) for more details
149
- * @dev Reverts if unable to redeem the total amount in `amountPYToRedeems`
150
- */
136
+ /// @dev this function limit how much each receiver will receive. For example, if the totalOut is 100,
137
+ /// and the max are 50 30 INF, the first receiver will receive 50, the second will receive 30, and the third will receive 20.
138
+ /// @dev intended to mostly be used by Pendle router
151
139
  function redeemPYMulti(address[] calldata receivers, uint256[] calldata amountPYToRedeems)
152
140
  external
153
141
  nonReentrant
@@ -160,15 +148,12 @@ contract PendleYieldToken is
160
148
  }
161
149
 
162
150
  /**
163
- * @notice Redeems interests and rewards for `user`
164
- * @param redeemInterest will only transfer out interest for user if true
165
- * @param redeemRewards will only transfer out rewards for user if true
166
- * @dev With YT yielding interest in the form of SY, which is redeemable by users, the reward
167
- * distribution should be based on the amount of SYs that their YT currently represent, plus their
168
- * dueInterest. It has been proven and tested that _rewardSharesUser will not change over time,
169
- * unless users redeem their dueInterest or redeemPY. Due to this, it is required to update users'
170
- * accruedReward STRICTLY BEFORE transferring out their interest.
171
- */
151
+ * @dev With YT yielding interest in the form of SY, which is redeemable by users, the reward
152
+ distribution should be based on the amount of SYs that their YT currently represent, plus their
153
+ dueInterest. It has been proven and tested that _rewardSharesUser will not change over time,
154
+ unless users redeem their dueInterest or redeemPY. Due to this, it is required to update users'
155
+ accruedReward STRICTLY BEFORE transferring out their interest.
156
+ */
172
157
  function redeemDueInterestAndRewards(
173
158
  address user,
174
159
  bool redeemInterest,
@@ -197,7 +182,6 @@ contract PendleYieldToken is
197
182
  }
198
183
  }
199
184
 
200
- /// @dev reverts if called before expiry
201
185
  function redeemInterestAndRewardsPostExpiryForTreasury()
202
186
  external
203
187
  nonReentrant
@@ -224,36 +208,21 @@ contract PendleYieldToken is
224
208
  _transferOut(SY, treasury, interestOut);
225
209
  }
226
210
 
227
- /// @notice updates and returns the reward indexes
228
211
  function rewardIndexesCurrent() external override nonReentrant returns (uint256[] memory) {
229
212
  return IStandardizedYield(SY).rewardIndexesCurrent();
230
213
  }
231
214
 
232
- /// @dev maximizes the current rate with the previous rate to guarantee non-decreasing rate
215
+ /// @dev maximize the current rate with the previous rate to guarantee non-decreasing rate
233
216
  function pyIndexCurrent() public nonReentrant returns (uint256 currentIndex) {
234
217
  currentIndex = _pyIndexCurrent();
235
218
  }
236
-
237
- /// @notice returns the last-updated PY index
238
- function pyIndexStored() public view returns (uint256) {
239
- return _pyIndexStored;
240
- }
241
219
 
242
- /// @dev has no effect if called pre-expiry
243
220
  function setPostExpiryData() external nonReentrant {
244
221
  if (isExpired()) {
245
222
  _setPostExpiryData();
246
223
  }
247
224
  }
248
225
 
249
- /**
250
- * @notice returns the current data post-expiry, if exists
251
- * @dev reverts if post-expiry data not set (see `setPostExpiryData()`)
252
- * @return firstPYIndex the earliest PY index post-expiry
253
- * @return totalSyInterestForTreasury current amount of SY interests post-expiry for treasury
254
- * @return firstRewardIndexes the earliest reward indices post-expiry, for each reward token
255
- * @return userRewardOwed amount of unclaimed user rewards, for each reward token
256
- */
257
226
  function getPostExpiryData()
258
227
  external
259
228
  view
@@ -304,6 +273,10 @@ contract PendleYieldToken is
304
273
  }
305
274
  }
306
275
 
276
+ function pyIndexStored() public view returns (uint256) {
277
+ return _pyIndexStored;
278
+ }
279
+
307
280
  function isExpired() public view returns (bool) {
308
281
  return MiniHelpers.isCurrentlyExpired(expiry);
309
282
  }
@@ -363,7 +336,7 @@ contract PendleYieldToken is
363
336
  }
364
337
 
365
338
  function _updateSyReserve() internal virtual {
366
- syReserve = _selfBalance(SY);
339
+ syReserve = _selfBalance(SY).Uint128();
367
340
  }
368
341
 
369
342
  function _getFloatingSyAmount() internal view returns (uint256 amount) {
@@ -396,14 +369,8 @@ contract PendleYieldToken is
396
369
  }
397
370
 
398
371
  function _pyIndexCurrent() internal returns (uint256 currentIndex) {
399
- uint128 index128 = Math
400
- .max(IStandardizedYield(SY).exchangeRate(), _pyIndexStored)
401
- .Uint128();
402
-
403
- currentIndex = index128;
404
- _pyIndexStored = index128;
405
- pyIndexLastUpdatedBlock = uint128(block.number);
406
-
372
+ currentIndex = Math.max(IStandardizedYield(SY).exchangeRate(), _pyIndexStored);
373
+ _pyIndexStored = currentIndex.Uint128();
407
374
  emit NewInterestIndex(currentIndex);
408
375
  }
409
376
 
@@ -13,7 +13,7 @@ import "@openzeppelin/contracts/utils/Context.sol";
13
13
  * - comes with built-in reentrancy protection, storage-packed with totalSupply variable
14
14
  * - delete increaseAllowance / decreaseAllowance
15
15
  * - add nonReentrancy protection to transfer / transferFrom functions
16
- * - allow decimals to be passed in
16
+ * - allow decimals to by passed in
17
17
  * - block self-transfer by default
18
18
  */
19
19
  // solhint-disable
@@ -26,7 +26,7 @@ contract PendleERC20 is Context, IERC20, IERC20Metadata {
26
26
  mapping(address => mapping(address => uint256)) private _allowances;
27
27
 
28
28
  uint248 private _totalSupply;
29
- uint8 private _status;
29
+ uint8 private _status;
30
30
 
31
31
  string private _name;
32
32
  string private _symbol;
@@ -54,9 +54,12 @@ contract PendleERC20 is Context, IERC20, IERC20Metadata {
54
54
  }
55
55
 
56
56
  /**
57
- * @dev Sets the values for {name}, {symbol} and {decimals}.
57
+ * @dev Sets the values for {name} and {symbol}.
58
58
  *
59
- * All three of these values are immutable: they can only be set once during
59
+ * The default value of {decimals} is 18. To select a different value for
60
+ * {decimals} you should overload it.
61
+ *
62
+ * All two of these values are immutable: they can only be set once during
60
63
  * construction.
61
64
  */
62
65
  constructor(
@@ -164,7 +164,7 @@ library BaseSplitCodeFactory {
164
164
  uint256 creationCodeSizeA,
165
165
  address creationCodeContractB,
166
166
  uint256 creationCodeSizeB
167
- ) internal view returns (bytes memory) {
167
+ ) public view returns (bytes memory) {
168
168
  return
169
169
  _getCreationCodeWithArgs(
170
170
  "",
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity 0.8.17;
3
3
 
4
- import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
4
+ import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
5
5
 
6
6
  contract BoringOwnableUpgradeableData {
7
7
  address public owner;