@pendle/core-v2 0.7.0 → 0.7.1-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.
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.json +2 -39
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json +2 -26
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol/PendleBtrflyScy.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol/PendleBtrflyScy.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol/PendleJoeLpSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol/PendleJoeLpSCY.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol/PendleYearnVaultSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol/PendleYearnVaultSCY.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBase.sol/SCYBase.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.json +0 -24
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/{CelerReceiver.sol/CelerReceiver.json → CelerReceiverUpg.sol/CelerReceiverUpg.json} +2 -2
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/{CelerSender.sol/CelerSender.json → CelerSenderUpg.sol/CelerSenderUpg.json} +15 -2
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/{PendleGaugeController.sol/PendleGaugeController.json → PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json} +2 -2
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchainUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchainUpg.json +255 -0
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechainUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechainUpg.json +318 -0
- package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.json +0 -24
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +776 -0
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/{VotingControllerStorage.sol/VotingControllerStorage.json → VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json} +16 -49
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +15 -43
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/{VotingEscrowToken.sol/VotingEscrowToken.json → VotingEscrowTokenBase.sol/VotingEscrowTokenBase.json} +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -26
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +13 -7
- package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.json +2 -2
- package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
- package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +4 -0
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.json +35 -0
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +15 -82
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +15 -7
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +77 -95
- package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.json +2 -2
- package/build/artifacts/contracts/core/actions/ActionCore.sol/ActionCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionCore.sol/ActionCore.json +2 -2
- package/build/artifacts/contracts/core/actions/ActionYT.sol/ActionYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionYT.sol/ActionYT.json +2 -2
- package/build/artifacts/contracts/core/actions/base/ActionSCYAndPTBase.sol/ActionSCYAndPTBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/base/ActionSCYAndPYBase.sol/ActionSCYAndPYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/base/ActionSCYAndYTBase.sol/ActionSCYAndYTBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ICelerMessageBus.sol/ICelerMessageBus.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ICelerMessageReceiverApp.sol/ICelerMessageReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IJoePair.sol/IJoePair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IJoeRouter01.sol/IJoeRouter01.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IJoeRouter02.sol/IJoeRouter02.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionYT.sol/IPActionYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.json +26 -0
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.json +26 -0
- package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.json +35 -0
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketAddRemoveCallback.sol/IPMarketAddRemoveCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketAddRemoveCallback.sol/IPMarketAddRemoveCallback.json +2 -2
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.json +6 -0
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.json +13 -0
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrow.sol/IPVotingEscrow.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +91 -43
- package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.json +7 -2
- package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/RewardManager.sol/RewardManager.json +0 -24
- package/build/artifacts/contracts/libraries/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/RewardManagerAbstract.sol/RewardManagerAbstract.json +40 -0
- package/build/artifacts/contracts/libraries/SCY/SCYIndex.sol/SCYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/SCY/SCYIndex.sol/SCYIndexLib.json +2 -2
- package/build/artifacts/contracts/libraries/SCY/SCYUtils.sol/SCYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/SCY/SCYUtils.sol/SCYUtils.json +2 -2
- package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/{solmate/LibRLP.sol/LibRLP.json → VeHistoryLib.sol/Checkpoints.json} +4 -4
- package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.json +10 -0
- package/build/artifacts/contracts/libraries/helpers/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
- package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxLib.json +2 -2
- package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/Math.sol/Math.json +2 -2
- package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.json +2 -2
- package/build/artifacts/contracts/libraries/solmate/Bytes32AddressLib.sol/Bytes32AddressLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/solmate/Bytes32AddressLib.sol/Bytes32AddressLib.json +2 -2
- package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.json +2 -2
- package/build/artifacts/contracts/libraries/traderjoe/JoeLibrary.sol/JoeLibrary.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/traderjoe/JoeLibrary.sol/JoeLibrary.json +2 -2
- package/build/artifacts/contracts/libraries/traderjoe/PendleJoeSwapHelperUpg.sol/PendleJoeSwapHelperUpg.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +3 -3
- package/build/artifacts/contracts/periphery/PendleGovernanceManager.sol/PendleGovernanceManager.dbg.json +1 -1
- package/build/artifacts/contracts/periphery/PendleGovernanceManager.sol/PendleGovernanceManager.json +2 -2
- package/build/artifacts/contracts/periphery/PermissionsV2Upg.sol/PermissionsV2Upg.dbg.json +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol +1 -1
- package/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol +1 -1
- package/contracts/SuperComposableYield/base-implementations/SCYBase.sol +1 -1
- package/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol +1 -1
- package/contracts/core/LiquidityMining/CelerAbstracts/{CelerReceiver.sol → CelerReceiverUpg.sol} +8 -2
- package/contracts/core/LiquidityMining/CelerAbstracts/{CelerSender.sol → CelerSenderUpg.sol} +10 -3
- package/contracts/core/LiquidityMining/GaugeController/{PendleGaugeController.sol → PendleGaugeControllerBaseUpg.sol} +9 -4
- package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol +7 -4
- package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol +9 -5
- package/contracts/core/LiquidityMining/PendleGauge.sol +1 -1
- package/contracts/core/LiquidityMining/VotingController/{PendleVotingController.sol → PendleVotingControllerUpg.sol} +19 -6
- package/contracts/core/LiquidityMining/VotingController/{VotingControllerStorage.sol → VotingControllerStorageUpg.sol} +14 -10
- package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +12 -8
- package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +5 -5
- package/contracts/core/LiquidityMining/VotingEscrow/{VotingEscrowToken.sol → VotingEscrowTokenBase.sol} +2 -3
- package/contracts/core/Market/PendleMarket.sol +4 -5
- package/contracts/core/Market/PendleMarketFactory.sol +17 -20
- package/contracts/core/PendleRouter.sol +1 -1
- package/contracts/core/YieldContracts/InterestManagerYT.sol +1 -1
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +15 -7
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +18 -19
- package/contracts/core/YieldContracts/PendleYieldToken.sol +37 -28
- package/contracts/core/actions/ActionCallback.sol +1 -1
- package/contracts/core/actions/ActionCore.sol +1 -1
- package/contracts/core/actions/ActionYT.sol +1 -1
- package/contracts/core/actions/base/ActionSCYAndPTBase.sol +1 -1
- package/contracts/core/actions/base/ActionSCYAndPYBase.sol +1 -1
- package/contracts/core/actions/base/ActionSCYAndYTBase.sol +1 -1
- package/contracts/core/actions/base/CallbackHelper.sol +1 -1
- package/contracts/interfaces/IAToken.sol +1 -1
- package/contracts/interfaces/IAavePool.sol +1 -1
- package/contracts/interfaces/IAaveRewardsController.sol +1 -1
- package/contracts/interfaces/IBenQiComptroller.sol +1 -1
- package/contracts/interfaces/IBenQiInterestRateModel.sol +1 -1
- package/contracts/interfaces/IERC4626.sol +1 -1
- package/contracts/interfaces/IJoeRouter01.sol +1 -1
- package/contracts/interfaces/IJoeRouter02.sol +1 -1
- package/contracts/interfaces/IPActionCore.sol +1 -1
- package/contracts/interfaces/IPActionYT.sol +1 -1
- package/contracts/interfaces/IPAllAction.sol +1 -1
- package/contracts/interfaces/IPGaugeController.sol +7 -1
- package/contracts/interfaces/IPGaugeControllerMainchain.sol +1 -1
- package/contracts/interfaces/IPGovernanceManager.sol +1 -1
- package/contracts/interfaces/IPInterestManagerYT.sol +1 -1
- package/contracts/interfaces/IPMarket.sol +1 -1
- package/contracts/interfaces/IPMarketAddRemoveCallback.sol +1 -1
- package/contracts/interfaces/IPMarketFactory.sol +7 -2
- package/contracts/interfaces/IPMarketSwapCallback.sol +1 -1
- package/contracts/interfaces/IPPermissionsV2Upg.sol +1 -1
- package/contracts/interfaces/IPPrincipalToken.sol +3 -1
- package/contracts/interfaces/IPRouterStatic.sol +1 -1
- package/contracts/interfaces/IPVeToken.sol +1 -1
- package/contracts/interfaces/IPVotingController.sol +1 -1
- package/contracts/interfaces/IPVotingEscrow.sol +1 -1
- package/contracts/interfaces/IPYieldContractFactory.sol +1 -1
- package/contracts/interfaces/IPYieldToken.sol +14 -4
- package/contracts/interfaces/IQiAvax.sol +1 -1
- package/contracts/interfaces/IQiErc20.sol +1 -1
- package/contracts/interfaces/IQiToken.sol +1 -1
- package/contracts/interfaces/IREDACTEDStaking.sol +1 -1
- package/contracts/interfaces/IRewardManager.sol +1 -1
- package/contracts/interfaces/ISuperComposableYield.sol +1 -1
- package/contracts/interfaces/IWETH.sol +1 -1
- package/contracts/interfaces/IWXBTRFLY.sol +1 -1
- package/contracts/interfaces/IWstETH.sol +1 -1
- package/contracts/interfaces/IYearnVault.sol +1 -1
- package/contracts/libraries/RewardManager.sol +1 -1
- package/contracts/libraries/RewardManagerAbstract.sol +6 -2
- package/contracts/libraries/SCY/SCYIndex.sol +1 -1
- package/contracts/libraries/SCY/SCYUtils.sol +1 -1
- package/contracts/libraries/VeBalanceLib.sol +1 -35
- package/contracts/libraries/VeHistoryLib.sol +60 -0
- package/contracts/libraries/helpers/ExpiryUtilsLib.sol +1 -1
- package/contracts/libraries/helpers/MiniHelpers.sol +1 -1
- package/contracts/libraries/helpers/SSTORE2Deployer.sol +30 -0
- package/contracts/libraries/helpers/TokenHelper.sol +1 -1
- package/contracts/libraries/math/LogExpMath.sol +1 -1
- package/contracts/libraries/math/MarketApproxLib.sol +1 -1
- package/contracts/libraries/math/MarketMathCore.sol +1 -1
- package/contracts/libraries/math/Math.sol +1 -1
- package/contracts/libraries/math/WeekMath.sol +1 -1
- package/contracts/libraries/traderjoe/JoeLibrary.sol +1 -1
- package/contracts/libraries/traderjoe/PendleJoeSwapHelperUpg.sol +1 -1
- package/contracts/offchain-helpers/RouterStatic.sol +3 -3
- package/contracts/periphery/PendleGovernanceManager.sol +1 -1
- package/contracts/periphery/PermissionsV2Upg.sol +7 -1
- package/deployments/43113-benqi.json +6 -0
- package/deployments/43113-core.json +14 -0
- package/deployments/43113-markets/benqi-market.json +7 -0
- package/deployments/80001-benqi.json +6 -0
- package/deployments/80001-core.json +13 -0
- package/deployments/80001-markets/benqi-market.json +7 -0
- package/package.json +2 -2
- package/typechain-types/{CelerReceiver.ts → CelerReceiverUpg.ts} +5 -5
- package/typechain-types/{CelerSender.ts → CelerSenderUpg.ts} +24 -5
- package/typechain-types/IPGaugeController.ts +63 -0
- package/typechain-types/IPGaugeControllerMainchain.ts +62 -0
- package/typechain-types/{IVePToken.ts → IPInterestManagerYT.ts} +38 -27
- package/typechain-types/IPMarketAddRemoveCallback.ts +10 -10
- package/typechain-types/IPMarketFactory.ts +11 -4
- package/typechain-types/IPPrincipalToken.ts +25 -0
- package/typechain-types/IPYieldToken.ts +106 -106
- package/typechain-types/IRewardManager.ts +15 -14
- package/typechain-types/{IPGauge.ts → InterestManagerYT.ts} +27 -28
- package/typechain-types/PendleAaveV3SCY.ts +0 -70
- package/typechain-types/PendleGauge.ts +0 -39
- package/typechain-types/{PendleGaugeController.ts → PendleGaugeControllerBaseUpg.ts} +5 -5
- package/typechain-types/{PendleGaugeControllerMainchain.ts → PendleGaugeControllerMainchainUpg.ts} +5 -5
- package/typechain-types/{PendleGaugeControllerSidechain.ts → PendleGaugeControllerSidechainUpg.ts} +5 -5
- package/typechain-types/PendleMarket.ts +0 -39
- package/typechain-types/PendleMarketFactory.ts +18 -6
- package/typechain-types/PendlePrincipalToken.ts +25 -104
- package/typechain-types/PendleQiTokenSCY.ts +0 -39
- package/typechain-types/{PendleVotingController.ts → PendleVotingControllerUpg.ts} +165 -62
- package/typechain-types/{PendleYearnVaultScy.ts → PendleYearnVaultSCY.ts} +0 -0
- package/typechain-types/PendleYieldContractFactory.ts +31 -0
- package/typechain-types/PendleYieldToken.ts +84 -177
- package/typechain-types/RewardManager.ts +0 -39
- package/typechain-types/{IBeacon.ts → RewardManagerAbstract.ts} +38 -17
- package/typechain-types/RouterStatic.ts +5 -11
- package/typechain-types/SCYBaseWithRewards.ts +0 -39
- package/typechain-types/{VotingControllerStorage.ts → VotingControllerStorageUpg.ts} +28 -68
- package/typechain-types/VotingEscrowPendleMainchain.ts +19 -54
- package/typechain-types/{VotingEscrowToken.ts → VotingEscrowTokenBase.ts} +5 -5
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionCore__factory.ts +1 -1
- package/typechain-types/factories/ActionYT__factory.ts +1 -1
- package/typechain-types/factories/{CelerReceiver__factory.ts → CelerReceiverUpg__factory.ts} +9 -6
- package/typechain-types/factories/{CelerSender__factory.ts → CelerSenderUpg__factory.ts} +22 -6
- package/typechain-types/factories/ERC20__factory.ts +1 -1
- package/typechain-types/factories/IPGaugeControllerMainchain__factory.ts +26 -0
- package/typechain-types/factories/IPGaugeController__factory.ts +26 -0
- package/typechain-types/factories/IPInterestManagerYT__factory.ts +50 -0
- package/typechain-types/factories/IPMarketAddRemoveCallback__factory.ts +2 -2
- package/typechain-types/factories/IPMarketFactory__factory.ts +6 -0
- package/typechain-types/factories/IPPrincipalToken__factory.ts +13 -0
- package/typechain-types/factories/IPYieldToken__factory.ts +91 -43
- package/typechain-types/factories/IRewardManager__factory.ts +7 -2
- package/typechain-types/factories/InterestManagerYT__factory.ts +50 -0
- package/typechain-types/factories/PendleAaveV3SCY__factory.ts +1 -38
- package/typechain-types/factories/PendleBtrflyScy__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleERC4626SCY__factory.ts +1 -1
- package/typechain-types/factories/{PendleGaugeController__factory.ts → PendleGaugeControllerBaseUpg__factory.ts} +8 -8
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +334 -0
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +393 -0
- package/typechain-types/factories/PendleGauge__factory.ts +0 -24
- package/typechain-types/factories/PendleGovernanceManager__factory.ts +1 -1
- package/typechain-types/factories/PendleJoeLpSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +12 -11
- package/typechain-types/factories/PendleMarket__factory.ts +1 -25
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +14 -85
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSCY__factory.ts +1 -25
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +845 -0
- package/typechain-types/factories/PendleWstEthSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleYearnVaultSCY__factory.ts +691 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +14 -11
- package/typechain-types/factories/PendleYieldToken__factory.ts +76 -94
- package/typechain-types/factories/RewardManagerAbstract__factory.ts +59 -0
- package/typechain-types/factories/RewardManager__factory.ts +0 -24
- package/typechain-types/factories/RouterStatic__factory.ts +2 -2
- package/typechain-types/factories/SCYBaseWithRewards__factory.ts +0 -24
- package/typechain-types/factories/{VotingControllerStorage__factory.ts → VotingControllerStorageUpg__factory.ts} +22 -55
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +14 -42
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/factories/{VotingEscrowToken__factory.ts → VotingEscrowTokenBase__factory.ts} +12 -8
- package/typechain-types/hardhat.d.ts +54 -72
- package/typechain-types/index.ts +22 -26
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiver.sol/CelerReceiver.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerSender.sol/CelerSender.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeController.sol/PendleGaugeController.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchain.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchain.json +0 -255
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechain.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechain.json +0 -318
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingController.sol/PendleVotingController.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingController.sol/PendleVotingController.json +0 -707
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorage.sol/VotingControllerStorage.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowToken.sol/VotingEscrowToken.dbg.json +0 -4
- package/build/artifacts/contracts/libraries/RewardManagerMini.sol/RewardManagerMini.dbg.json +0 -4
- package/build/artifacts/contracts/libraries/RewardManagerMini.sol/RewardManagerMini.json +0 -101
- package/build/artifacts/contracts/libraries/helpers/MiniDeployer.sol/MiniDeployer.dbg.json +0 -4
- package/build/artifacts/contracts/libraries/helpers/MiniDeployer.sol/MiniDeployer.json +0 -10
- package/build/artifacts/contracts/libraries/solmate/LibRLP.sol/LibRLP.dbg.json +0 -4
- package/contracts/libraries/helpers/MiniDeployer.sol +0 -23
- package/contracts/libraries/solmate/LibRLP.sol +0 -30
- package/deployments/kovan.json +0 -31
- package/typechain-types/ActionRedeem.ts +0 -125
- package/typechain-types/BeaconProxy.ts +0 -97
- package/typechain-types/ERC1967Upgrade.ts +0 -97
- package/typechain-types/IERC1822Proxiable.ts +0 -87
- package/typechain-types/IPActionRedeem.ts +0 -125
- package/typechain-types/IPBaseToken.ts +0 -365
- package/typechain-types/IPVotingEscrowController.ts +0 -154
- package/typechain-types/IPendleGauge.ts +0 -241
- package/typechain-types/IVotingEscrowPendle.ts +0 -297
- package/typechain-types/PendleBaseToken.ts +0 -475
- package/typechain-types/PendleBenQiErc20SCY.ts +0 -1050
- package/typechain-types/PendleMarketRewards.ts +0 -1317
- package/typechain-types/PendleStEthSCY.ts +0 -872
- package/typechain-types/RewardManagerMini.ts +0 -200
- package/typechain-types/VotingEscrowController.ts +0 -154
- package/typechain-types/factories/ActionRedeem__factory.ts +0 -105
- package/typechain-types/factories/BeaconProxy__factory.ts +0 -141
- package/typechain-types/factories/ERC1967Upgrade__factory.ts +0 -71
- package/typechain-types/factories/IBeacon__factory.ts +0 -36
- package/typechain-types/factories/IERC1822Proxiable__factory.ts +0 -39
- package/typechain-types/factories/IPActionRedeem__factory.ts +0 -70
- package/typechain-types/factories/IPBaseToken__factory.ts +0 -271
- package/typechain-types/factories/IPGauge__factory.ts +0 -42
- package/typechain-types/factories/IPVotingEscrowController__factory.ts +0 -80
- package/typechain-types/factories/IPendleGauge__factory.ts +0 -125
- package/typechain-types/factories/IVePToken__factory.ts +0 -55
- package/typechain-types/factories/IVotingEscrowPendle__factory.ts +0 -182
- package/typechain-types/factories/PendleBaseToken__factory.ts +0 -348
- package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +0 -871
- package/typechain-types/factories/PendleGaugeControllerMainchain__factory.ts +0 -332
- package/typechain-types/factories/PendleGaugeControllerSidechain__factory.ts +0 -391
- package/typechain-types/factories/PendleMarketRewards__factory.ts +0 -1140
- package/typechain-types/factories/PendleStEthSCY__factory.ts +0 -716
- package/typechain-types/factories/PendleVotingController__factory.ts +0 -776
- package/typechain-types/factories/PendleYearnVaultScy__factory.ts +0 -691
- package/typechain-types/factories/RewardManagerMini__factory.ts +0 -116
- package/typechain-types/factories/VotingEscrowController__factory.ts +0 -80
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.15;
|
|
3
3
|
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
4
4
|
import "./IRewardManager.sol";
|
|
5
5
|
import "./IPInterestManagerYT.sol";
|
|
6
6
|
|
|
7
7
|
interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
8
|
+
event Mint(
|
|
9
|
+
address indexed caller,
|
|
10
|
+
address indexed receiverPT,
|
|
11
|
+
address indexed receiverYT,
|
|
12
|
+
uint256 amount
|
|
13
|
+
);
|
|
14
|
+
event Redeem(address indexed caller, address indexed receiver, uint256 amount);
|
|
15
|
+
|
|
8
16
|
event RedeemRewards(address indexed user, uint256[] amountRewardsOut);
|
|
9
17
|
event RedeemInterest(address indexed user, uint256 interestOut);
|
|
10
18
|
|
|
@@ -14,9 +22,9 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
14
22
|
|
|
15
23
|
function redeemPY(address receiver) external returns (uint256 amountScyOut);
|
|
16
24
|
|
|
17
|
-
function redeemPY(address[] memory receivers, uint256[] memory
|
|
25
|
+
function redeemPY(address[] memory receivers, uint256[] memory maxAmountScyOuts)
|
|
18
26
|
external
|
|
19
|
-
returns (uint256
|
|
27
|
+
returns (uint256 totalAmountScyOut);
|
|
20
28
|
|
|
21
29
|
function redeemDueInterestAndRewards(address user)
|
|
22
30
|
external
|
|
@@ -28,7 +36,9 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
28
36
|
|
|
29
37
|
function rewardIndexesCurrent() external returns (uint256[] memory);
|
|
30
38
|
|
|
31
|
-
function
|
|
39
|
+
function scyIndexCurrent() external returns (uint256);
|
|
40
|
+
|
|
41
|
+
function scyIndexStored() external view returns (uint256);
|
|
32
42
|
|
|
33
43
|
function getRewardTokens() external view returns (address[] memory);
|
|
34
44
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
*/
|
|
23
|
-
pragma solidity 0.8.
|
|
23
|
+
pragma solidity 0.8.15;
|
|
24
24
|
|
|
25
25
|
interface IREDACTEDStaking {
|
|
26
26
|
function stake(uint256 _amount, address _receiver) external returns (bool);
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
pragma solidity 0.8.
|
|
24
|
+
pragma solidity 0.8.15;
|
|
25
25
|
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
26
26
|
|
|
27
27
|
interface ISuperComposableYield is IERC20Metadata {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
*/
|
|
23
|
-
pragma solidity 0.8.
|
|
23
|
+
pragma solidity 0.8.15;
|
|
24
24
|
|
|
25
25
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
26
26
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
*/
|
|
23
|
-
pragma solidity 0.8.
|
|
23
|
+
pragma solidity 0.8.15;
|
|
24
24
|
|
|
25
25
|
interface IWXBTRFLY {
|
|
26
26
|
function wrapFromBTRFLY(uint256 _amount) external returns (uint256);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.15;
|
|
3
3
|
import "../interfaces/IRewardManager.sol";
|
|
4
4
|
import "./helpers/TokenHelper.sol";
|
|
5
5
|
import "./math/Math.sol";
|
|
@@ -47,7 +47,11 @@ abstract contract RewardManagerAbstract is IRewardManager, TokenHelper {
|
|
|
47
47
|
uint256 index = indexes[i];
|
|
48
48
|
uint256 userIndex = userReward[token][user].index;
|
|
49
49
|
|
|
50
|
-
if (userIndex == 0)
|
|
50
|
+
if (userIndex == 0) {
|
|
51
|
+
userReward[token][user].index = index.Uint128();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
|
|
51
55
|
if (userIndex == index) continue;
|
|
52
56
|
|
|
53
57
|
uint256 deltaIndex = index - userIndex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.15;
|
|
3
3
|
|
|
4
4
|
struct VeBalance {
|
|
5
5
|
uint128 bias;
|
|
@@ -11,11 +11,6 @@ struct LockedPosition {
|
|
|
11
11
|
uint128 expiry;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
struct Checkpoint {
|
|
15
|
-
VeBalance balance;
|
|
16
|
-
uint128 timestamp;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
14
|
library VeBalanceLib {
|
|
20
15
|
uint128 internal constant MAX_LOCK_TIME = 104 weeks;
|
|
21
16
|
|
|
@@ -64,35 +59,6 @@ library VeBalanceLib {
|
|
|
64
59
|
return a.bias / a.slope;
|
|
65
60
|
}
|
|
66
61
|
|
|
67
|
-
function getCheckpointValueAt(Checkpoint[] storage checkpoints, uint128 timestamp)
|
|
68
|
-
internal
|
|
69
|
-
view
|
|
70
|
-
returns (uint128)
|
|
71
|
-
{
|
|
72
|
-
if (checkpoints.length == 0 || checkpoints[0].timestamp > timestamp) {
|
|
73
|
-
return 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
uint256 left = 0;
|
|
77
|
-
uint256 right = checkpoints.length;
|
|
78
|
-
|
|
79
|
-
while (left < right) {
|
|
80
|
-
uint256 mid = (left + right) / 2;
|
|
81
|
-
if (checkpoints[mid].timestamp <= timestamp) {
|
|
82
|
-
left = mid;
|
|
83
|
-
} else {
|
|
84
|
-
right = mid - 1;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
VeBalance memory bal = checkpoints[left].balance;
|
|
89
|
-
if (getExpiry(bal) <= timestamp) {
|
|
90
|
-
return 0;
|
|
91
|
-
} else {
|
|
92
|
-
return getValueAt(bal, timestamp);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
62
|
function convertToVeBalance(LockedPosition memory position)
|
|
97
63
|
internal
|
|
98
64
|
pure
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Forked from OpenZeppelin (v4.5.0) (utils/Checkpoints.sol)
|
|
3
|
+
pragma solidity ^0.8.0;
|
|
4
|
+
|
|
5
|
+
import "./math/Math.sol";
|
|
6
|
+
import "./VeBalanceLib.sol";
|
|
7
|
+
|
|
8
|
+
library Checkpoints {
|
|
9
|
+
struct Checkpoint {
|
|
10
|
+
uint32 _timestamp;
|
|
11
|
+
VeBalance _value;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
struct History {
|
|
15
|
+
Checkpoint[] _checkpoints;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one
|
|
20
|
+
* before it is returned, or zero otherwise.
|
|
21
|
+
*/
|
|
22
|
+
function getAtTimestamp(History storage self, uint256 timestamp)
|
|
23
|
+
internal
|
|
24
|
+
view
|
|
25
|
+
returns (uint128)
|
|
26
|
+
{
|
|
27
|
+
require(timestamp < block.timestamp, "Checkpoints: block not yet mined");
|
|
28
|
+
|
|
29
|
+
uint256 high = self._checkpoints.length;
|
|
30
|
+
uint256 low = 0;
|
|
31
|
+
while (low < high) {
|
|
32
|
+
uint256 mid = (low + high) / 2;
|
|
33
|
+
if (self._checkpoints[mid]._timestamp > timestamp) {
|
|
34
|
+
high = mid;
|
|
35
|
+
} else {
|
|
36
|
+
low = mid + 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return
|
|
40
|
+
high == 0
|
|
41
|
+
? 0
|
|
42
|
+
: VeBalanceLib.getValueAt(self._checkpoints[high - 1]._value, uint128(timestamp));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.
|
|
47
|
+
*
|
|
48
|
+
* Returns previous value and new value.
|
|
49
|
+
*/
|
|
50
|
+
function push(History storage self, VeBalance memory value) internal {
|
|
51
|
+
uint256 pos = self._checkpoints.length;
|
|
52
|
+
if (pos > 0 && self._checkpoints[pos - 1]._timestamp == block.timestamp) {
|
|
53
|
+
self._checkpoints[pos - 1]._value = value;
|
|
54
|
+
} else {
|
|
55
|
+
self._checkpoints.push(
|
|
56
|
+
Checkpoint({ _timestamp: uint32(block.timestamp), _value: value })
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.15;
|
|
3
|
+
import "../solmate/SSTORE2.sol";
|
|
4
|
+
import "@openzeppelin/contracts/utils/Create2.sol";
|
|
5
|
+
|
|
6
|
+
/// @dev save creation code of a contract onchain, and load it when necessary
|
|
7
|
+
library SSTORE2Deployer {
|
|
8
|
+
function setCreationCode(bytes memory newCreationCode) internal returns (address pointer) {
|
|
9
|
+
require(newCreationCode.length > 0, "zero length");
|
|
10
|
+
pointer = SSTORE2.write(newCreationCode);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function create2(
|
|
14
|
+
address creationCodePointer,
|
|
15
|
+
bytes32 salt,
|
|
16
|
+
bytes memory args
|
|
17
|
+
) internal returns (address) {
|
|
18
|
+
return create2(SSTORE2.read(creationCodePointer), salt, args);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// call create2 directly by the provided creationCode
|
|
22
|
+
function create2(
|
|
23
|
+
bytes memory creationCode,
|
|
24
|
+
bytes32 salt,
|
|
25
|
+
bytes memory args
|
|
26
|
+
) internal returns (address) {
|
|
27
|
+
bytes memory finalCreationCode = abi.encodePacked(creationCode, args);
|
|
28
|
+
return Create2.deploy(0, salt, finalCreationCode);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
13
13
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
14
|
|
|
15
|
-
pragma solidity 0.8.
|
|
15
|
+
pragma solidity 0.8.15;
|
|
16
16
|
|
|
17
17
|
/* solhint-disable */
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// You should have received a copy of the GNU General Public License
|
|
13
13
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
14
14
|
|
|
15
|
-
pragma solidity 0.8.
|
|
15
|
+
pragma solidity 0.8.15;
|
|
16
16
|
|
|
17
17
|
/* solhint-disable private-vars-leading-underscore, reason-string */
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
pragma solidity 0.8.
|
|
24
|
+
pragma solidity 0.8.15;
|
|
25
25
|
import "../../interfaces/IJoeRouter01.sol";
|
|
26
26
|
import "./JoeLibrary.sol";
|
|
27
27
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.15;
|
|
3
3
|
|
|
4
4
|
import "../interfaces/ISuperComposableYield.sol";
|
|
5
5
|
import "../interfaces/IRewardManager.sol";
|
|
@@ -79,7 +79,7 @@ contract RouterStatic is IPRouterStatic {
|
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
function scyIndex(address market) public returns (SCYIndex index) {
|
|
82
|
+
function scyIndex(address market) public view returns (SCYIndex index) {
|
|
83
83
|
(ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
|
|
84
84
|
|
|
85
85
|
return SCYIndexLib.newIndex(SCY);
|
|
@@ -145,7 +145,7 @@ contract RouterStatic is IPRouterStatic {
|
|
|
145
145
|
{
|
|
146
146
|
(address yt, ) = getPY(py);
|
|
147
147
|
IPYieldToken YT = IPYieldToken(yt);
|
|
148
|
-
exchangeRate = YT.
|
|
148
|
+
exchangeRate = YT.scyIndexCurrent();
|
|
149
149
|
totalSupply = YT.totalSupply();
|
|
150
150
|
address[] memory rewardTokens = YT.getRewardTokens();
|
|
151
151
|
rewardIndexes = new RewardIndex[](rewardTokens.length);
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.15;
|
|
3
3
|
|
|
4
4
|
import "../interfaces/IPGovernanceManager.sol";
|
|
5
5
|
import "../interfaces/IPPermissionsV2Upg.sol";
|
|
6
6
|
|
|
7
|
+
/// This contract is upgradable because
|
|
8
|
+
/// - its constructor only sets immutable variables
|
|
9
|
+
/// - it has storage gaps for safe addition of future variables
|
|
10
|
+
/// - it inherits only upgradable contract
|
|
7
11
|
abstract contract PermissionsV2Upg is IPermissionsV2Upg {
|
|
8
12
|
address public immutable governanceManager;
|
|
9
13
|
|
|
14
|
+
uint256[100] private __gap;
|
|
15
|
+
|
|
10
16
|
modifier onlyGovernance() {
|
|
11
17
|
require(msg.sender == _governance(), "ONLY_GOVERNANCE");
|
|
12
18
|
_;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
3
|
+
"network": 43113,
|
|
4
|
+
"celerBus": "0xE9533976C590200E32d95C53f06AE12d292cFc47",
|
|
5
|
+
"treasury": "0x8c73eEef8A74223717c129e6F18Df27508dbCb23",
|
|
6
|
+
"governanceManager": "0xe8d12F4e6933107C797E369Dd577bfca9f412758",
|
|
7
|
+
"PENDLE": "0xd6403Ff542290C38EE4fCFf48552FA85fbe8539B",
|
|
8
|
+
"yieldContractFactory": "0x0EA46a4C257071352b57E9F6d054fC137F6E14b9",
|
|
9
|
+
"marketFactory": "0x9e7be80205815111617B9578157e130ECd9757e4",
|
|
10
|
+
"startTime": 1656547200,
|
|
11
|
+
"vePendle": "0x5CA98fBE317f0165499E886286A2737FE5A913E7",
|
|
12
|
+
"votingController": "0xcb0d3d9147845C7F2B77DCFBE4dB8114d928DC93",
|
|
13
|
+
"gaugeController": "0x38F5320795CE3BeD55b87decca0A60e52f65c522"
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
3
|
+
"network": 80001,
|
|
4
|
+
"celerBus": "0x7d43AABC515C356145049227CeE54B608342c0ad",
|
|
5
|
+
"treasury": "0x3865D8a1Bd6D281f6c77d4e233d26Cd56380EF45",
|
|
6
|
+
"governanceManager": "0xFC7eC014280A98850F4167aF47c0272f0E7490A5",
|
|
7
|
+
"PENDLE": "0x53F435CEC95c597d905f0903a13F4dAbEA8491dB",
|
|
8
|
+
"yieldContractFactory": "0x4e5De6339FC7Ef63c176f9A7e7a8B2aC21744B8D",
|
|
9
|
+
"marketFactory": "0xCAd502Bb55d1A3F79952F969BFF3f011CF30a94a",
|
|
10
|
+
"startTime": 1656547200,
|
|
11
|
+
"vePendle": "0x69A23F16974024A1b6A5362ac2A11BFeEEFd5827",
|
|
12
|
+
"gaugeController": "0x847da006F940833bB44709CBa241c99e3c531F38"
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pendle/core-v2",
|
|
3
3
|
"description": "Core smart contracts of Pendle Protocol.",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.1-beta",
|
|
6
6
|
"homepage": "https://pendle.finance",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"pendle",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"hardhat-contract-sizer": "^2.5.1",
|
|
30
30
|
"prettier": "^2.6.2",
|
|
31
31
|
"prettier-plugin-solidity": "^1.0.0-beta.19",
|
|
32
|
-
"solc": "^0.8.
|
|
32
|
+
"solc": "^0.8.15",
|
|
33
33
|
"solhint": "^3.3.7",
|
|
34
34
|
"ts-node": "^10.7.0",
|
|
35
35
|
"typechain": "^8.0.0",
|
|
@@ -23,8 +23,8 @@ import type {
|
|
|
23
23
|
OnEvent,
|
|
24
24
|
} from "./common";
|
|
25
25
|
|
|
26
|
-
export interface
|
|
27
|
-
contractName: "
|
|
26
|
+
export interface CelerReceiverUpgInterface extends utils.Interface {
|
|
27
|
+
contractName: "CelerReceiverUpg";
|
|
28
28
|
functions: {
|
|
29
29
|
"celerMessageBus()": FunctionFragment;
|
|
30
30
|
"executeMessage(address,uint64,bytes,address)": FunctionFragment;
|
|
@@ -93,13 +93,13 @@ export interface CelerReceiverInterface extends utils.Interface {
|
|
|
93
93
|
events: {};
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export interface
|
|
97
|
-
contractName: "
|
|
96
|
+
export interface CelerReceiverUpg extends BaseContract {
|
|
97
|
+
contractName: "CelerReceiverUpg";
|
|
98
98
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
99
99
|
attach(addressOrName: string): this;
|
|
100
100
|
deployed(): Promise<this>;
|
|
101
101
|
|
|
102
|
-
interface:
|
|
102
|
+
interface: CelerReceiverUpgInterface;
|
|
103
103
|
|
|
104
104
|
queryFilter<TEvent extends TypedEvent>(
|
|
105
105
|
event: TypedEventFilter<TEvent>,
|