@pendle/core-v2 0.7.1-beta → 0.8.0-beta

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 (294) hide show
  1. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.dbg.json +1 -1
  2. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.json +33 -17
  3. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.dbg.json +1 -1
  4. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.json +2 -2
  5. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  6. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  7. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +1 -1
  8. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json +33 -17
  9. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.dbg.json +1 -1
  10. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.json +33 -17
  11. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +1 -1
  12. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json +33 -17
  13. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol/PendleYearnVaultSCY.dbg.json +1 -1
  14. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol/PendleYearnVaultSCY.json +33 -17
  15. package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBase.sol/SCYBase.dbg.json +1 -1
  16. package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBase.sol/SCYBase.json +31 -15
  17. package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +1 -1
  18. package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.json +31 -15
  19. package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.dbg.json +1 -1
  20. package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.dbg.json +1 -1
  21. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  22. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  23. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  24. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  25. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  26. package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  27. package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.json +0 -26
  28. package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  29. package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  30. package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  31. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  32. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  33. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  35. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  36. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +125 -111
  38. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  39. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  40. package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.json +2 -2
  42. package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
  44. package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.json +2 -2
  46. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +77 -2
  49. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +51 -20
  51. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +72 -93
  53. package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.json +2 -2
  55. package/build/artifacts/contracts/core/actions/ActionCore.sol/ActionCore.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/actions/ActionCore.sol/ActionCore.json +3 -3
  57. package/build/artifacts/contracts/core/actions/ActionYT.sol/ActionYT.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/actions/ActionYT.sol/ActionYT.json +2 -2
  59. package/build/artifacts/contracts/core/actions/base/ActionSCYAndPTBase.sol/ActionSCYAndPTBase.dbg.json +1 -1
  60. package/build/artifacts/contracts/core/actions/base/ActionSCYAndPYBase.sol/ActionSCYAndPYBase.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/actions/base/ActionSCYAndYTBase.sol/ActionSCYAndYTBase.dbg.json +1 -1
  62. package/build/artifacts/contracts/core/actions/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  63. package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
  64. package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.dbg.json +1 -1
  65. package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +1 -1
  66. package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.dbg.json +1 -1
  67. package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
  68. package/build/artifacts/contracts/interfaces/ICelerMessageBus.sol/ICelerMessageBus.dbg.json +1 -1
  69. package/build/artifacts/contracts/interfaces/ICelerMessageReceiverApp.sol/ICelerMessageReceiverApp.dbg.json +1 -1
  70. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  71. package/build/artifacts/contracts/interfaces/IJoePair.sol/IJoePair.dbg.json +1 -1
  72. package/build/artifacts/contracts/interfaces/IJoeRouter01.sol/IJoeRouter01.dbg.json +1 -1
  73. package/build/artifacts/contracts/interfaces/IJoeRouter02.sol/IJoeRouter02.dbg.json +1 -1
  74. package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.dbg.json +1 -1
  75. package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.json +1 -1
  76. package/build/artifacts/contracts/interfaces/IPActionYT.sol/IPActionYT.dbg.json +1 -1
  77. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  78. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +1 -1
  79. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  80. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
  81. package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.dbg.json +1 -1
  82. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  83. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  84. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +48 -83
  85. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  86. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
  87. package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.dbg.json +1 -1
  88. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  89. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  90. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +20 -15
  91. package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  93. package/build/artifacts/contracts/interfaces/IPVotingEscrow.sol/IPVotingEscrow.dbg.json +1 -1
  94. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  95. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +30 -4
  96. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  97. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +8 -92
  98. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  99. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  101. package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +1 -1
  102. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  103. package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +1 -1
  104. package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.json +31 -2
  105. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +1 -1
  107. package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
  108. package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.dbg.json +1 -1
  109. package/build/artifacts/contracts/libraries/RewardManager.sol/RewardManager.dbg.json +1 -1
  110. package/build/artifacts/contracts/libraries/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  111. package/build/artifacts/contracts/libraries/SCY/SCYIndex.sol/SCYIndexLib.dbg.json +1 -1
  112. package/build/artifacts/contracts/libraries/SCY/SCYIndex.sol/SCYIndexLib.json +2 -2
  113. package/build/artifacts/contracts/libraries/SCY/SCYUtils.sol/SCYUtils.dbg.json +1 -1
  114. package/build/artifacts/contracts/libraries/SCY/SCYUtils.sol/SCYUtils.json +2 -2
  115. package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  116. package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  117. package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  118. package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  119. package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  120. package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.json +2 -2
  121. package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  122. package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
  123. package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
  124. package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.json +2 -2
  125. package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.dbg.json +1 -1
  126. package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.json +2 -2
  127. package/build/artifacts/contracts/libraries/helpers/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  128. package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  129. package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
  130. package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxLib.dbg.json +1 -1
  131. package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxLib.json +2 -2
  132. package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  133. package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.json +2 -2
  134. package/build/artifacts/contracts/libraries/math/Math.sol/Math.dbg.json +1 -1
  135. package/build/artifacts/contracts/libraries/math/Math.sol/Math.json +2 -2
  136. package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.dbg.json +1 -1
  137. package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.json +2 -2
  138. package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.dbg.json +1 -1
  139. package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.json +2 -2
  140. package/build/artifacts/contracts/libraries/traderjoe/JoeLibrary.sol/JoeLibrary.dbg.json +1 -1
  141. package/build/artifacts/contracts/libraries/traderjoe/JoeLibrary.sol/JoeLibrary.json +2 -2
  142. package/build/artifacts/contracts/libraries/traderjoe/PendleJoeSwapHelperUpg.sol/PendleJoeSwapHelperUpg.dbg.json +1 -1
  143. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
  144. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +166 -13
  145. package/build/artifacts/contracts/periphery/PendleGovernanceManager.sol/PendleGovernanceManager.dbg.json +1 -1
  146. package/build/artifacts/contracts/periphery/PendleGovernanceManager.sol/PendleGovernanceManager.json +2 -2
  147. package/build/artifacts/contracts/periphery/PermissionsV2Upg.sol/PermissionsV2Upg.dbg.json +1 -1
  148. package/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol +16 -12
  149. package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol +3 -3
  150. package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol +20 -0
  151. package/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol +20 -0
  152. package/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol +20 -0
  153. package/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol +29 -2
  154. package/contracts/SuperComposableYield/base-implementations/SCYBase.sol +63 -41
  155. package/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol +0 -7
  156. package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +1 -1
  157. package/contracts/core/LiquidityMining/PendleGauge.sol +24 -8
  158. package/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +47 -96
  159. package/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +86 -73
  160. package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +17 -16
  161. package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +1 -1
  162. package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +3 -4
  163. package/contracts/core/Market/PendleMarket.sol +32 -62
  164. package/contracts/core/PendleRouter.sol +1 -1
  165. package/contracts/core/YieldContracts/InterestManagerYT.sol +11 -8
  166. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
  167. package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +18 -12
  168. package/contracts/core/YieldContracts/PendleYieldToken.sol +167 -140
  169. package/contracts/core/actions/ActionCallback.sol +11 -10
  170. package/contracts/core/actions/ActionCore.sol +84 -22
  171. package/contracts/core/actions/ActionYT.sol +33 -15
  172. package/contracts/core/actions/base/ActionSCYAndPTBase.sol +4 -15
  173. package/contracts/core/actions/base/ActionSCYAndPYBase.sol +20 -50
  174. package/contracts/core/actions/base/ActionSCYAndYTBase.sol +2 -12
  175. package/contracts/interfaces/IPActionCore.sol +72 -1
  176. package/contracts/interfaces/IPActionYT.sol +15 -0
  177. package/contracts/interfaces/IPMarket.sol +7 -26
  178. package/contracts/interfaces/IPRouterStatic.sol +67 -47
  179. package/contracts/interfaces/IPVeToken.sol +0 -2
  180. package/contracts/interfaces/IPVotingEscrow.sol +1 -1
  181. package/contracts/interfaces/IPYieldContractFactory.sol +6 -2
  182. package/contracts/interfaces/IPYieldToken.sol +21 -11
  183. package/contracts/interfaces/ISuperComposableYield.sol +22 -28
  184. package/contracts/interfaces/IYearnVault.sol +8 -0
  185. package/contracts/libraries/RewardManager.sol +9 -6
  186. package/contracts/libraries/RewardManagerAbstract.sol +6 -8
  187. package/contracts/libraries/SCY/SCYIndex.sol +10 -0
  188. package/contracts/libraries/VeBalanceLib.sol +0 -1
  189. package/contracts/libraries/helpers/ArrayLib.sol +11 -0
  190. package/contracts/libraries/helpers/TokenHelper.sol +6 -5
  191. package/contracts/libraries/math/MarketApproxLib.sol +91 -36
  192. package/contracts/libraries/math/Math.sol +2 -4
  193. package/contracts/offchain-helpers/RouterStatic.sol +144 -115
  194. package/deployments/43113-core.json +11 -9
  195. package/deployments/43113-markets/benqi-market-0xF3150c14F776c50C9D397054d38979c7B77FC41D.json +7 -0
  196. package/deployments/80001-core.json +10 -8
  197. package/deployments/80001-markets/benqi-market-0x150b6eb90Bf636eC0c4328d13d1e1d4adDBAF904.json +7 -0
  198. package/package.json +2 -2
  199. package/typechain-types/ActionCore.ts +8 -8
  200. package/typechain-types/CelerReceiver.ts +267 -0
  201. package/typechain-types/CelerSender.ts +164 -0
  202. package/typechain-types/IPActionCore.ts +8 -8
  203. package/typechain-types/IPAllAction.ts +8 -8
  204. package/typechain-types/IPMarket.ts +66 -109
  205. package/typechain-types/IPRouterStatic.ts +64 -41
  206. package/typechain-types/IPVotingEscrowController.ts +154 -0
  207. package/typechain-types/IPYieldContractFactory.ts +34 -0
  208. package/typechain-types/IPYieldToken.ts +12 -112
  209. package/typechain-types/ISuperComposableYield.ts +54 -10
  210. package/typechain-types/PendleAaveV3SCY.ts +54 -29
  211. package/typechain-types/PendleBtrflyScy.ts +56 -58
  212. package/typechain-types/PendleERC4626SCY.ts +54 -29
  213. package/typechain-types/PendleGauge.ts +0 -32
  214. package/typechain-types/PendleGaugeController.ts +282 -0
  215. package/typechain-types/PendleGaugeControllerMainchain.ts +346 -0
  216. package/typechain-types/PendleGaugeControllerSidechain.ts +460 -0
  217. package/typechain-types/PendleJoeLpSCY.ts +56 -58
  218. package/typechain-types/PendleMarket.ts +169 -140
  219. package/typechain-types/PendlePrincipalToken.ts +104 -0
  220. package/typechain-types/PendleQiTokenSCY.ts +54 -29
  221. package/typechain-types/PendleVotingController.ts +865 -0
  222. package/typechain-types/PendleWstEthSCY.ts +54 -29
  223. package/typechain-types/PendleYearnVaultSCY.ts +54 -29
  224. package/typechain-types/PendleYieldContractFactory.ts +66 -19
  225. package/typechain-types/PendleYieldToken.ts +122 -158
  226. package/typechain-types/RouterStatic.ts +297 -24
  227. package/typechain-types/SCYBase.ts +54 -29
  228. package/typechain-types/SCYBaseWithRewards.ts +54 -29
  229. package/typechain-types/VotingControllerStorage.ts +410 -0
  230. package/typechain-types/VotingEscrowController.ts +154 -0
  231. package/typechain-types/VotingEscrowToken.ts +335 -0
  232. package/typechain-types/factories/ActionCallback__factory.ts +1 -1
  233. package/typechain-types/factories/ActionCore__factory.ts +2 -2
  234. package/typechain-types/factories/ActionYT__factory.ts +1 -1
  235. package/typechain-types/factories/CelerReceiver__factory.ts +140 -0
  236. package/typechain-types/factories/CelerSender__factory.ts +67 -0
  237. package/typechain-types/factories/ERC20__factory.ts +1 -1
  238. package/typechain-types/factories/IPActionCore__factory.ts +1 -1
  239. package/typechain-types/factories/IPAllAction__factory.ts +1 -1
  240. package/typechain-types/factories/IPMarket__factory.ts +48 -83
  241. package/typechain-types/factories/IPRouterStatic__factory.ts +20 -15
  242. package/typechain-types/factories/IPVotingEscrowController__factory.ts +80 -0
  243. package/typechain-types/factories/IPYieldContractFactory__factory.ts +30 -4
  244. package/typechain-types/factories/IPYieldToken__factory.ts +6 -90
  245. package/typechain-types/factories/ISuperComposableYield__factory.ts +31 -2
  246. package/typechain-types/factories/PendleAaveV3SCY__factory.ts +32 -16
  247. package/typechain-types/factories/PendleBtrflyScy__factory.ts +52 -28
  248. package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
  249. package/typechain-types/factories/PendleERC20__factory.ts +1 -1
  250. package/typechain-types/factories/PendleERC4626SCY__factory.ts +32 -16
  251. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  252. package/typechain-types/factories/PendleGaugeControllerMainchain__factory.ts +269 -0
  253. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  254. package/typechain-types/factories/PendleGaugeControllerSidechain__factory.ts +328 -0
  255. package/typechain-types/factories/PendleGaugeController__factory.ts +149 -0
  256. package/typechain-types/factories/PendleGauge__factory.ts +0 -26
  257. package/typechain-types/factories/PendleGovernanceManager__factory.ts +1 -1
  258. package/typechain-types/factories/PendleJoeLpSCY__factory.ts +34 -28
  259. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  260. package/typechain-types/factories/PendleMarket__factory.ts +124 -110
  261. package/typechain-types/factories/PendlePrincipalToken__factory.ts +76 -1
  262. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  263. package/typechain-types/factories/PendleQiTokenSCY__factory.ts +32 -16
  264. package/typechain-types/factories/PendleRouter__factory.ts +1 -1
  265. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  266. package/typechain-types/factories/PendleVotingController__factory.ts +584 -0
  267. package/typechain-types/factories/PendleWstEthSCY__factory.ts +32 -16
  268. package/typechain-types/factories/PendleYearnVaultSCY__factory.ts +32 -16
  269. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +54 -19
  270. package/typechain-types/factories/PendleYieldToken__factory.ts +70 -91
  271. package/typechain-types/factories/RouterStatic__factory.ts +165 -12
  272. package/typechain-types/factories/SCYBaseWithRewards__factory.ts +31 -15
  273. package/typechain-types/factories/SCYBase__factory.ts +31 -15
  274. package/typechain-types/factories/VotingControllerStorage__factory.ts +298 -0
  275. package/typechain-types/factories/VotingEscrowController__factory.ts +80 -0
  276. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  277. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  278. package/typechain-types/factories/VotingEscrowToken__factory.ts +225 -0
  279. package/typechain-types/hardhat.d.ts +0 -27
  280. package/typechain-types/index.ts +0 -6
  281. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol/PendleBtrflyScy.dbg.json +0 -4
  282. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol/PendleBtrflyScy.json +0 -635
  283. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol/PendleJoeLpSCY.dbg.json +0 -4
  284. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol/PendleJoeLpSCY.json +0 -653
  285. package/build/artifacts/contracts/interfaces/IPMarketAddRemoveCallback.sol/IPMarketAddRemoveCallback.dbg.json +0 -4
  286. package/build/artifacts/contracts/interfaces/IPMarketAddRemoveCallback.sol/IPMarketAddRemoveCallback.json +0 -67
  287. package/build/artifacts/contracts/libraries/solmate/Bytes32AddressLib.sol/Bytes32AddressLib.dbg.json +0 -4
  288. package/build/artifacts/contracts/libraries/solmate/Bytes32AddressLib.sol/Bytes32AddressLib.json +0 -10
  289. package/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol +0 -123
  290. package/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol +0 -245
  291. package/contracts/interfaces/IPMarketAddRemoveCallback.sol +0 -18
  292. package/contracts/libraries/solmate/Bytes32AddressLib.sol +0 -14
  293. package/deployments/43113-markets/benqi-market.json +0 -7
  294. package/deployments/80001-markets/benqi-market.json +0 -7
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/879ec58d72562fa1c0aef384949c6d3c.json"
4
- }
@@ -1,67 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "IPMarketAddRemoveCallback",
4
- "sourceName": "contracts/interfaces/IPMarketAddRemoveCallback.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "uint256",
10
- "name": "lpToAccount",
11
- "type": "uint256"
12
- },
13
- {
14
- "internalType": "uint256",
15
- "name": "scyUsed",
16
- "type": "uint256"
17
- },
18
- {
19
- "internalType": "uint256",
20
- "name": "ptUsed",
21
- "type": "uint256"
22
- },
23
- {
24
- "internalType": "bytes",
25
- "name": "data",
26
- "type": "bytes"
27
- }
28
- ],
29
- "name": "addLiquidityCallback",
30
- "outputs": [],
31
- "stateMutability": "nonpayable",
32
- "type": "function"
33
- },
34
- {
35
- "inputs": [
36
- {
37
- "internalType": "uint256",
38
- "name": "lpOwed",
39
- "type": "uint256"
40
- },
41
- {
42
- "internalType": "uint256",
43
- "name": "scyToAccount",
44
- "type": "uint256"
45
- },
46
- {
47
- "internalType": "uint256",
48
- "name": "ptToAccount",
49
- "type": "uint256"
50
- },
51
- {
52
- "internalType": "bytes",
53
- "name": "data",
54
- "type": "bytes"
55
- }
56
- ],
57
- "name": "removeLiquidityCallback",
58
- "outputs": [],
59
- "stateMutability": "nonpayable",
60
- "type": "function"
61
- }
62
- ],
63
- "bytecode": "0x",
64
- "deployedBytecode": "0x",
65
- "linkReferences": {},
66
- "deployedLinkReferences": {}
67
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../../build-info/f5816395d5e1f2525b60137e72433fa7.json"
4
- }
@@ -1,10 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "Bytes32AddressLib",
4
- "sourceName": "contracts/libraries/solmate/Bytes32AddressLib.sol",
5
- "abi": [],
6
- "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bd83a6ed0f6a6cb1411148557218ce05367c955a2b8660f2b004f54ebed2915f64736f6c634300080f0033",
7
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bd83a6ed0f6a6cb1411148557218ce05367c955a2b8660f2b004f54ebed2915f64736f6c634300080f0033",
8
- "linkReferences": {},
9
- "deployedLinkReferences": {}
10
- }
@@ -1,123 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity 0.8.15;
3
-
4
- import "../base-implementations/SCYBase.sol";
5
- import "../../interfaces/IWXBTRFLY.sol";
6
- import "../../interfaces/IREDACTEDStaking.sol";
7
-
8
- contract PendleBtrflyScy is SCYBase {
9
- address public immutable BTRFLY;
10
- address public immutable xBTRFLY;
11
- address public immutable wxBTRFLY;
12
-
13
- constructor(
14
- string memory _name,
15
- string memory _symbol,
16
- address _wxBTRFLY
17
- ) SCYBase(_name, _symbol, _wxBTRFLY) {
18
- require(_wxBTRFLY != address(0), "zero address");
19
- wxBTRFLY = _wxBTRFLY;
20
- BTRFLY = IWXBTRFLY(wxBTRFLY).BTRFLY();
21
- xBTRFLY = IWXBTRFLY(wxBTRFLY).xBTRFLY();
22
-
23
- _safeApprove(BTRFLY, wxBTRFLY, type(uint256).max);
24
- _safeApprove(xBTRFLY, wxBTRFLY, type(uint256).max);
25
- }
26
-
27
- /*///////////////////////////////////////////////////////////////
28
- DEPOSIT/REDEEM USING BASE TOKENS
29
- //////////////////////////////////////////////////////////////*/
30
-
31
- /**
32
- * @dev See {SCYBase-_deposit}
33
- *
34
- * The underlying yield token is wxBTRFLY. If the base token is not said token, the contract
35
- * first wraps from `tokenIn` to wxBRTRFLY. Then the corresponding amount of shares is returned.
36
- *
37
- * The exchange rate of wxBTRFLY to shares is 1:1
38
- */
39
- function _deposit(address tokenIn, uint256 amountDeposited)
40
- internal
41
- virtual
42
- override
43
- returns (uint256 amountSharesOut)
44
- {
45
- if (tokenIn == wxBTRFLY) {
46
- amountSharesOut = amountDeposited;
47
- } else if (tokenIn == xBTRFLY) {
48
- // wrapFromxBTRFLY returns amountWXBTRFLYout
49
- amountSharesOut = IWXBTRFLY(wxBTRFLY).wrapFromxBTRFLY(amountDeposited);
50
- } else {
51
- // must be BTRFLY
52
- // wrapFromBTRFLY returns amountWXBTRFLYout
53
- amountSharesOut = IWXBTRFLY(wxBTRFLY).wrapFromBTRFLY(amountDeposited);
54
- }
55
- }
56
-
57
- /**
58
- * @dev See {SCYBase-_redeem}
59
- *
60
- * The shares are redeemed into the same amount of wxBTRFLY. If `tokenOut` is not wxBTRFLY
61
- * the function unwraps said amount of wxBTRFLY into `tokenOut` for redemption.
62
- */
63
- function _redeem(address tokenOut, uint256 amountSharesToRedeem)
64
- internal
65
- virtual
66
- override
67
- returns (uint256 amountTokenOut)
68
- {
69
- if (tokenOut == wxBTRFLY) {
70
- amountTokenOut = amountSharesToRedeem;
71
- } else if (tokenOut == xBTRFLY) {
72
- amountTokenOut = IWXBTRFLY(wxBTRFLY).unwrapToxBTRFLY(amountSharesToRedeem);
73
- } else {
74
- // must be BTRFLY
75
- amountTokenOut = IWXBTRFLY(wxBTRFLY).unwrapToBTRFLY(amountSharesToRedeem);
76
- }
77
- }
78
-
79
- /*///////////////////////////////////////////////////////////////
80
- EXCHANGE-RATE
81
- //////////////////////////////////////////////////////////////*/
82
-
83
- /**
84
- * @notice Calculates and updates the exchange rate of shares to underlying asset token
85
- * @dev It is the conversion rate of wxBTRFLY to BTRFLY
86
- */
87
- function exchangeRate() public view virtual override returns (uint256) {
88
- return IWXBTRFLY(wxBTRFLY).xBTRFLYValue(Math.ONE);
89
- }
90
-
91
- /*///////////////////////////////////////////////////////////////
92
- MISC FUNCTIONS FOR METADATA
93
- //////////////////////////////////////////////////////////////*/
94
-
95
- /**
96
- * @dev See {ISuperComposableYield-getBaseTokens}
97
- */
98
- function getBaseTokens() public view virtual override returns (address[] memory res) {
99
- res = new address[](3);
100
- res[0] = BTRFLY;
101
- res[1] = xBTRFLY;
102
- res[2] = wxBTRFLY;
103
- }
104
-
105
- /**
106
- * @dev See {ISuperComposableYield-isValidBaseToken}
107
- */
108
- function isValidBaseToken(address token) public view virtual override returns (bool) {
109
- return token == BTRFLY || token == xBTRFLY || token == wxBTRFLY;
110
- }
111
-
112
- function assetInfo()
113
- external
114
- view
115
- returns (
116
- AssetType assetType,
117
- address assetAddress,
118
- uint8 assetDecimals
119
- )
120
- {
121
- return (AssetType.TOKEN, BTRFLY, IERC20Metadata(BTRFLY).decimals());
122
- }
123
- }
@@ -1,245 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity 0.8.15;
3
-
4
- import "../../interfaces/IJoePair.sol";
5
- import "../../interfaces/IJoeRouter02.sol";
6
- import "../base-implementations/SCYBase.sol";
7
- import "../../libraries/math/LogExpMath.sol";
8
-
9
- contract PendleJoeLpSCY is SCYBase {
10
- using Math for uint256;
11
-
12
- address public immutable joeRouter;
13
- address public immutable joePair;
14
- address public immutable token0;
15
- address public immutable token1;
16
-
17
- constructor(
18
- string memory _name,
19
- string memory _symbol,
20
- address _joeRouter,
21
- address _joePair
22
- ) SCYBase(_name, _symbol, _joePair) {
23
- require(_joeRouter != address(0), "zero address");
24
- joeRouter = _joeRouter;
25
- joePair = _joePair;
26
- token0 = IJoePair(joePair).token0();
27
- token1 = IJoePair(joePair).token1();
28
- _safeApprove(token0, joeRouter, type(uint256).max);
29
- _safeApprove(token1, joeRouter, type(uint256).max);
30
- }
31
-
32
- /*///////////////////////////////////////////////////////////////
33
- DEPOSIT/REDEEM USING BASE TOKENS
34
- //////////////////////////////////////////////////////////////*/
35
-
36
- function _deposit(address tokenIn, uint256 amount)
37
- internal
38
- override
39
- returns (uint256 amountSharesOut)
40
- {
41
- if (tokenIn == joePair) {
42
- amountSharesOut = amount;
43
- } else {
44
- amountSharesOut = _performZapIn(tokenIn, amount);
45
- }
46
- }
47
-
48
- function _redeem(address tokenOut, uint256 amountSharesToRedeem)
49
- internal
50
- override
51
- returns (uint256 amountBaseOut)
52
- {
53
- if (tokenOut == joePair) {
54
- amountBaseOut = amountSharesToRedeem;
55
- } else {
56
- amountBaseOut = _performZapOut(tokenOut, amountSharesToRedeem);
57
- }
58
- }
59
-
60
- /*///////////////////////////////////////////////////////////////
61
- EXCHANGE-RATE
62
- //////////////////////////////////////////////////////////////*/
63
-
64
- function exchangeRate() public view override returns (uint256) {
65
- (uint256 reserve0, uint256 reserve1, ) = IJoePair(joePair).getReserves();
66
-
67
- // K = sqrt(reserve0 * reserve1) = pow(reserve0*reserve1, 0.5)
68
- uint256 currentK = LogExpMath.pow(reserve0 * reserve1, uint256(LogExpMath.ONE_18 / 2));
69
- uint256 totalSupply = IJoePair(joePair).totalSupply();
70
- return currentK.divDown(totalSupply);
71
- }
72
-
73
- /*///////////////////////////////////////////////////////////////
74
- MISC FUNCTIONS FOR METADATA
75
- //////////////////////////////////////////////////////////////*/
76
-
77
- function getBaseTokens() public view override returns (address[] memory res) {
78
- res = new address[](3);
79
- res[0] = token0;
80
- res[1] = token1;
81
- res[2] = joePair;
82
- }
83
-
84
- function isValidBaseToken(address token) public view override returns (bool res) {
85
- res = (token == token0 || token == token1 || token == joePair);
86
- }
87
-
88
- function assetInfo()
89
- external
90
- view
91
- returns (
92
- AssetType assetType,
93
- address assetAddress,
94
- uint8 assetDecimals
95
- )
96
- {
97
- return (AssetType.LIQUIDITY, joePair, IERC20Metadata(joePair).decimals());
98
- }
99
-
100
- /*///////////////////////////////////////////////////////////////
101
- ZAPPING IN/OUT USING ZAPPER'S ALGORITHMS
102
- //////////////////////////////////////////////////////////////*/
103
-
104
- function _performZapIn(address fromToken, uint256 amount) internal returns (uint256) {
105
- require(fromToken == token0 || fromToken == token1, "Invalid fromToken");
106
- // divide intermediate into appropriate amount to add liquidity
107
- (uint256 token0Bought, uint256 token1Bought) = _swapIntermediate(fromToken, amount);
108
-
109
- return _joeAddLiquidity(token0Bought, token1Bought, true);
110
- }
111
-
112
- function _performZapOut(address toToken, uint256 lpToRemove) internal returns (uint256) {
113
- (uint256 token0Received, uint256 token1Received) = _joeRemoveLiquidity(lpToRemove);
114
-
115
- if (toToken == token0) {
116
- uint256 token0FromSwap = _token2Token(token1, token0, token1Received);
117
- return token0Received + token0FromSwap;
118
- } else {
119
- uint256 token1FromSwap = _token2Token(token0, token1, token0Received);
120
- return token1Received + token1FromSwap;
121
- }
122
- }
123
-
124
- function _swapIntermediate(address fromToken, uint256 amount)
125
- internal
126
- returns (uint256 token0Bought, uint256 token1Bought)
127
- {
128
- (uint256 res0, uint256 res1, ) = IJoePair(joePair).getReserves();
129
- if (fromToken == token0) {
130
- uint256 amountToSwap = calculateSwapInAmount(res0, amount);
131
- //if no reserve or a new pair is created
132
- if (amountToSwap <= 0) amountToSwap = amount / 2;
133
- token1Bought = _token2Token(fromToken, token1, amountToSwap);
134
- token0Bought = amount - amountToSwap;
135
- } else {
136
- uint256 amountToSwap = calculateSwapInAmount(res1, amount);
137
- //if no reserve or a new pair is created
138
- if (amountToSwap <= 0) amountToSwap = amount / 2;
139
- token0Bought = _token2Token(fromToken, token0, amountToSwap);
140
- token1Bought = amount - amountToSwap;
141
- }
142
- }
143
-
144
- function _joeAddLiquidity(
145
- uint256 token0Bought,
146
- uint256 token1Bought,
147
- bool transferResidual
148
- ) internal returns (uint256) {
149
- (uint256 amountA, uint256 amountB, uint256 LP) = IJoeRouter02(joeRouter).addLiquidity(
150
- token0,
151
- token1,
152
- token0Bought,
153
- token1Bought,
154
- 1,
155
- 1,
156
- address(this),
157
- type(uint256).max
158
- );
159
-
160
- if (transferResidual) {
161
- //Returning Residue in token0, if any.
162
- if (token0Bought - amountA > 0) {
163
- _transferOut(token0, msg.sender, token0Bought - amountA);
164
- }
165
-
166
- //Returning Residue in token1, if any
167
- if (token1Bought - amountB > 0) {
168
- _transferOut(token1, msg.sender, token1Bought - amountB);
169
- }
170
- }
171
-
172
- return LP;
173
- }
174
-
175
- function _joeRemoveLiquidity(uint256 lpToRemove)
176
- internal
177
- returns (uint256 token0Received, uint256 token1Received)
178
- {
179
- (token0Received, token1Received) = IJoeRouter02(joeRouter).removeLiquidity(
180
- token0,
181
- token1,
182
- lpToRemove,
183
- 1,
184
- 1,
185
- address(this),
186
- type(uint256).max
187
- );
188
- }
189
-
190
- function calculateSwapInAmount(uint256 reserveIn, uint256 userIn)
191
- internal
192
- pure
193
- returns (uint256)
194
- {
195
- return
196
- (_babylonianSqrt(reserveIn * ((userIn * 3988000) + (reserveIn * 3988009))) -
197
- (reserveIn * 1997)) / 1994;
198
- }
199
-
200
- function _babylonianSqrt(uint256 y) internal pure returns (uint256 z) {
201
- if (y > 3) {
202
- z = y;
203
- uint256 x = y / 2 + 1;
204
- while (x < z) {
205
- z = x;
206
- x = (y / x + x) / 2;
207
- }
208
- } else if (y != 0) {
209
- z = 1;
210
- }
211
- // else z = 0
212
- }
213
-
214
- /**
215
- @notice This function is used to swap ERC20 <> ERC20
216
- @param fromToken The token address to swap from.
217
- @param toToken The token address to swap to.
218
- @param tokens2Trade The amount of tokens to swap
219
- @return tokenBought The quantity of tokens bought
220
- */
221
- function _token2Token(
222
- address fromToken,
223
- address toToken,
224
- uint256 tokens2Trade
225
- ) internal returns (uint256 tokenBought) {
226
- if (fromToken == toToken) {
227
- return tokens2Trade;
228
- }
229
-
230
- require(joePair != address(0), "No Swap Available");
231
- address[] memory path = new address[](2);
232
- path[0] = fromToken;
233
- path[1] = toToken;
234
-
235
- tokenBought = IJoeRouter02(joeRouter).swapExactTokensForTokens(
236
- tokens2Trade,
237
- 1,
238
- path,
239
- address(this),
240
- type(uint256).max
241
- )[path.length - 1];
242
-
243
- require(tokenBought > 0, "Error Swapping Tokens 2");
244
- }
245
- }
@@ -1,18 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity 0.8.15;
3
-
4
- interface IPMarketAddRemoveCallback {
5
- function addLiquidityCallback(
6
- uint256 lpToAccount,
7
- uint256 scyUsed,
8
- uint256 ptUsed,
9
- bytes calldata data
10
- ) external;
11
-
12
- function removeLiquidityCallback(
13
- uint256 lpOwed,
14
- uint256 scyToAccount,
15
- uint256 ptToAccount,
16
- bytes calldata data
17
- ) external;
18
- }
@@ -1,14 +0,0 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
2
- pragma solidity >=0.8.0;
3
-
4
- /// @notice Library for converting between addresses and bytes32 values.
5
- /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/Bytes32AddressLib.sol)
6
- library Bytes32AddressLib {
7
- function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) {
8
- return address(uint160(uint256(bytesValue)));
9
- }
10
-
11
- function fillLast12Bytes(address addressValue) internal pure returns (bytes32) {
12
- return bytes32(bytes20(addressValue));
13
- }
14
- }
@@ -1,7 +0,0 @@
1
- {
2
- "SCY": "0xb597dE4e247945A4D0e577ef65a32Bd4E459C3A7",
3
- "expiry": 1672099200,
4
- "PT": "0x43963e93a024f1131549C657116321a67e3004B8",
5
- "YT": "0x8774E8D4A17f6DbDF93da23189df6026DD77aA34",
6
- "market": "0x700E66aD6C98d04f7c426060211fd98f12E0F1b6"
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "SCY": "0x0fE14FEB320a8DFF7b2Ee47E6BBedF309eF4B0C8",
3
- "expiry": 1672099200,
4
- "PT": "0x10AfeBB063A3c1A4e8A1E9274c4c9EbDDC574f0a",
5
- "YT": "0x52a59B51eb72E6c2e0F3FE4C2940123671a60DA5",
6
- "market": "0x0c37E7E799c9A41008b3d246B86F944992660dD5"
7
- }