@pendle/core-v2 0.9.0-gamma-2 → 0.9.2-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 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiSAvaxSCY.sol/PendleQiSAvaxSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiSAvaxSCY.sol/PendleQiSAvaxSCY.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/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleSAvaxSCY.sol/PendleSAvaxSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleSAvaxSCY.sol/PendleSAvaxSCY.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Euler/PendleEulerSCY.sol/PendleEulerSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Euler/PendleEulerSCY.sol/PendleEulerSCY.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/PendleStargateSCY.sol/PendleStargateSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleStargateSCY.sol/PendleStargateSCY.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/SCY-implementations/TraderJoe/PendleSJoeSCY.sol/PendleSJoeSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/TraderJoe/PendleSJoeSCY.sol/PendleSJoeSCY.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/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- 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 +2 -2
- 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 +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- 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 +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- 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 +185 -6
- 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/IEulerEToken.sol/IEulerEToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IEulerMarkets.sol/IEulerMarkets.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.json +183 -4
- 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/IPAllAction.sol/IPAllAction.json +183 -4
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- 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/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +2 -2
- 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/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/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISAvax.sol/ISAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateLPStaking.sol/IStargateLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargatePool.sol/IStargatePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.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/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/SCY/SCYUtils.sol/SCYUtils.dbg.json +1 -1
- 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 +1 -1
- package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- 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/solmate/SSTORE2.sol/SSTORE2.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 +80 -41
- package/build/artifacts/contracts/periphery/PermissionsV2Upg.sol/PermissionsV2Upg.dbg.json +1 -1
- package/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +1 -1
- package/contracts/core/PendleRouter.sol +4 -2
- package/contracts/core/actions/ActionCore.sol +71 -8
- package/contracts/core/actions/base/ActionSCYAndPTBase.sol +71 -14
- package/contracts/core/actions/base/ActionSCYAndYTBase.sol +1 -1
- package/contracts/interfaces/IPActionCore.sol +46 -4
- package/contracts/interfaces/IPRouterStatic.sol +2 -2
- package/contracts/libraries/math/Math.sol +4 -0
- package/contracts/offchain-helpers/RouterStatic.sol +39 -3
- package/package.json +1 -1
- package/typechain-types/ActionCore.ts +224 -32
- package/typechain-types/FeeDistributorAbstract.ts +164 -0
- package/typechain-types/IPActionCore.ts +224 -32
- package/typechain-types/IPAllAction.ts +224 -32
- package/typechain-types/IPRouterStatic.ts +16 -16
- package/typechain-types/IPVotingControllerStorage.ts +169 -0
- package/typechain-types/{PendleYearnVaultScy.ts → PendleYearnVaultSCY.ts} +0 -0
- package/typechain-types/RouterStatic.ts +145 -95
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionCore__factory.ts +184 -5
- package/typechain-types/factories/ActionYT__factory.ts +1 -1
- package/typechain-types/factories/{VotingEscrowController__factory.ts → FeeDistributorAbstract__factory.ts} +33 -23
- package/typechain-types/factories/IPActionCore__factory.ts +183 -4
- package/typechain-types/factories/IPAllAction__factory.ts +183 -4
- package/typechain-types/factories/IPRouterStatic__factory.ts +2 -2
- package/typechain-types/factories/IPVotingControllerStorage__factory.ts +107 -0
- package/typechain-types/factories/PendleAaveV3SCY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC4626SCY__factory.ts +1 -1
- package/typechain-types/factories/PendleEulerSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleQiSAvaxSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleSAvaxSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleSJoeSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSCY__factory.ts +1 -1
- package/typechain-types/factories/{PendleYearnVaultScy__factory.ts → PendleYearnVaultSCY__factory.ts} +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +79 -40
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +0 -54
- package/typechain-types/index.ts +0 -12
- package/typechain-types/ActionRedeem.ts +0 -125
- package/typechain-types/ActionSCYAndYOBase.ts +0 -223
- package/typechain-types/AggregatorV2V3Interface.ts +0 -380
- package/typechain-types/BenqiChainlinkOracle.ts +0 -362
- package/typechain-types/BoringOwnable.ts +0 -194
- package/typechain-types/BoringOwnableData.ts +0 -100
- package/typechain-types/BoringOwnableUpg.ts +0 -194
- package/typechain-types/BoringOwnableUpgData.ts +0 -100
- package/typechain-types/CelerReceiver.ts +0 -267
- package/typechain-types/CelerSender.ts +0 -197
- package/typechain-types/Comptroller.ts +0 -2860
- package/typechain-types/ComptrollerErrorReporter.ts +0 -70
- package/typechain-types/ComptrollerInterface.ts +0 -881
- package/typechain-types/ComptrollerVXStorage.ts +0 -781
- package/typechain-types/CrosschainContract.ts +0 -113
- package/typechain-types/CrosschainReceiver.ts +0 -347
- package/typechain-types/CrosschainSender.ts +0 -210
- package/typechain-types/EIP20Interface.ts +0 -337
- package/typechain-types/EIP20NonStandardInterface.ts +0 -298
- package/typechain-types/ERC20Burnable.ts +0 -473
- package/typechain-types/ERC20Locker.ts +0 -91
- package/typechain-types/ERC20Permit.ts +0 -521
- package/typechain-types/ERC20Premined.ts +0 -473
- package/typechain-types/ERC20PresetFixedSupply.ts +0 -473
- package/typechain-types/EpochController.ts +0 -195
- package/typechain-types/FundKeeper.ts +0 -347
- package/typechain-types/GaugeTypeControllerAbstract.ts +0 -546
- package/typechain-types/GaugeTypeControllerCrosschain.ts +0 -733
- package/typechain-types/GaugeTypeControllerMainchain.ts +0 -604
- package/typechain-types/IERC20Permit.ts +0 -175
- package/typechain-types/IGaugeController.ts +0 -99
- package/typechain-types/IJoePair.ts +0 -888
- package/typechain-types/IJoeRouter01.ts +0 -1107
- package/typechain-types/IJoeRouter02.ts +0 -1420
- package/typechain-types/ILiquidYieldToken.ts +0 -639
- package/typechain-types/ILiquidYieldTokenWrap.ts +0 -790
- package/typechain-types/IMessageBus.ts +0 -543
- package/typechain-types/IMessageReceiverApp.ts +0 -110
- package/typechain-types/IPActionRedeem.ts +0 -125
- package/typechain-types/IPActionSCYAndPY.ts +0 -183
- package/typechain-types/IPBaseToken.ts +0 -365
- package/typechain-types/IPFlashCallback.ts +0 -115
- package/typechain-types/IPGauge.ts +0 -212
- package/typechain-types/IPLiquidYieldToken.ts +0 -641
- package/typechain-types/IPMarketAddRemoveCallback.ts +0 -169
- package/typechain-types/IPMarketCallback.ts +0 -107
- package/typechain-types/IPOwnershipToken.ts +0 -488
- package/typechain-types/IPRouterCore.ts +0 -769
- package/typechain-types/IPRouterRedeem.ts +0 -155
- package/typechain-types/IPRouterYT.ts +0 -489
- package/typechain-types/IPVotingEscrowController.ts +0 -154
- package/typechain-types/IPendleGauge.ts +0 -241
- package/typechain-types/IPermissionsV2.ts +0 -87
- package/typechain-types/IRainbowBridge.ts +0 -91
- package/typechain-types/ISCYRewardIndex.ts +0 -695
- package/typechain-types/IVEPendleToken.ts +0 -121
- package/typechain-types/IVePToken.ts +0 -103
- package/typechain-types/IVotingEscrowPendle.ts +0 -297
- package/typechain-types/IXPendle.ts +0 -114
- package/typechain-types/InterestRateModel.ts +0 -178
- package/typechain-types/JumpRateModel.ts +0 -347
- package/typechain-types/LYTBase.ts +0 -721
- package/typechain-types/LYTBaseWithRewards.ts +0 -806
- package/typechain-types/LYTWrap.ts +0 -872
- package/typechain-types/LYTWrapWithRewards.ts +0 -979
- package/typechain-types/LiquidityMining.ts +0 -468
- package/typechain-types/Maximillion.ts +0 -145
- package/typechain-types/Ownable.ts +0 -160
- package/typechain-types/PendleAaveV3LYT.ts +0 -808
- package/typechain-types/PendleBaseToken.ts +0 -475
- package/typechain-types/PendleBenQiErc20LYT.ts +0 -901
- package/typechain-types/PendleBenQiErc20SCY.ts +0 -1050
- package/typechain-types/PendleBenqiLiquidYieldToken.ts +0 -1013
- package/typechain-types/PendleBtrflyLYT.ts +0 -781
- package/typechain-types/PendleBtrflyScy.ts +0 -822
- package/typechain-types/PendleCelerRouter.ts +0 -359
- package/typechain-types/PendleERC20Permit.ts +0 -443
- package/typechain-types/PendleGaugeController.ts +0 -346
- package/typechain-types/PendleGaugeControllerMainchain.ts +0 -410
- package/typechain-types/PendleGaugeControllerSidechain.ts +0 -524
- package/typechain-types/PendleJoeLpSCY.ts +0 -835
- package/typechain-types/PendleJoeSwapHelper.ts +0 -92
- package/typechain-types/PendleJoeSwapHelperUpg.ts +0 -84
- package/typechain-types/PendleLYTMockYT.ts +0 -894
- package/typechain-types/PendleLiquidYieldToken.ts +0 -814
- package/typechain-types/PendleLiquidYieldTokenBase.ts +0 -941
- package/typechain-types/PendleOwnershipToken.ts +0 -598
- package/typechain-types/PendleRouter01.ts +0 -184
- package/typechain-types/PendleRouter02.ts +0 -564
- package/typechain-types/PendleRouter03.ts +0 -224
- package/typechain-types/PendleRouterBase.ts +0 -126
- package/typechain-types/PendleRouterCore.ts +0 -328
- package/typechain-types/PendleRouterCoreUpg.ts +0 -798
- package/typechain-types/PendleRouterLytAndForge.ts +0 -331
- package/typechain-types/PendleRouterMarketBase.ts +0 -82
- package/typechain-types/PendleRouterOT.ts +0 -463
- package/typechain-types/PendleRouterProxy.ts +0 -335
- package/typechain-types/PendleRouterRawTokenOT.ts +0 -865
- package/typechain-types/PendleRouterRawTokenYT.ts +0 -520
- package/typechain-types/PendleRouterRedeemUpg.ts +0 -125
- package/typechain-types/PendleRouterSCYAndForgeBaseUpg.ts +0 -98
- package/typechain-types/PendleRouterStaticUpg.ts +0 -399
- package/typechain-types/PendleRouterYT.ts +0 -227
- package/typechain-types/PendleRouterYTBaseUpg.ts +0 -134
- package/typechain-types/PendleRouterYTUpg.ts +0 -537
- package/typechain-types/PendleStEthSCY.ts +0 -872
- package/typechain-types/PendleStargatePool.ts +0 -1135
- package/typechain-types/PendleVotingController.ts +0 -983
- package/typechain-types/PendleYTLYTBenqi.ts +0 -863
- package/typechain-types/PendleYearnVaultLYT.ts +0 -723
- package/typechain-types/PermissionsV2.ts +0 -87
- package/typechain-types/PermlessAbstract.ts +0 -57
- package/typechain-types/PglStakingContract.ts +0 -662
- package/typechain-types/PglStakingContractProxy.ts +0 -256
- package/typechain-types/PglStakingContractProxyStorage.ts +0 -136
- package/typechain-types/PglStakingContractStorage.ts +0 -397
- package/typechain-types/PriceOracle.ts +0 -116
- package/typechain-types/ProtocolFakeUser.ts +0 -105
- package/typechain-types/Qi.ts +0 -760
- package/typechain-types/QiAvax.ts +0 -1720
- package/typechain-types/QiDelegateInterface.ts +0 -145
- package/typechain-types/QiDelegationStorage.ts +0 -82
- package/typechain-types/QiDelegatorInterface.ts +0 -149
- package/typechain-types/QiErc20.ts +0 -1846
- package/typechain-types/QiErc20Delegate.ts +0 -1926
- package/typechain-types/QiErc20Delegator.ts +0 -1885
- package/typechain-types/QiErc20Interface.ts +0 -382
- package/typechain-types/QiErc20Storage.ts +0 -79
- package/typechain-types/QiToken.ts +0 -1475
- package/typechain-types/QiTokenInterface.ts +0 -1419
- package/typechain-types/QiTokenSaleDistributor.ts +0 -771
- package/typechain-types/QiTokenSaleDistributorProxy.ts +0 -256
- package/typechain-types/QiTokenSaleDistributorProxyStorage.ts +0 -136
- package/typechain-types/QiTokenSaleDistributorStorage.ts +0 -401
- package/typechain-types/QiTokenStorage.ts +0 -311
- package/typechain-types/ReentrancyGuard.ts +0 -52
- package/typechain-types/SingleGaugeTypeController.ts +0 -478
- package/typechain-types/TokenErrorReporter.ts +0 -70
- package/typechain-types/Unitroller.ts +0 -356
- package/typechain-types/UnitrollerAdminStorage.ts +0 -143
- package/typechain-types/VePendle.ts +0 -1156
- package/typechain-types/VePendleCrosschain.ts +0 -969
- package/typechain-types/VePendleToken.ts +0 -688
- package/typechain-types/VotingController.ts +0 -1004
- package/typechain-types/VotingControllerStorage.ts +0 -448
- package/typechain-types/VotingEscrowController.ts +0 -154
- package/typechain-types/VotingEscrowPendle.ts +0 -752
- package/typechain-types/VotingEscrowToken.ts +0 -251
- package/typechain-types/WETH9.ts +0 -414
- package/typechain-types/WhitePaperInterestRateModel.ts +0 -304
- package/typechain-types/XPendle.ts +0 -618
- package/typechain-types/factories/ActionRedeem__factory.ts +0 -105
- package/typechain-types/factories/ActionSCYAndYOBase__factory.ts +0 -200
- package/typechain-types/factories/AggregatorV2V3Interface__factory.ts +0 -288
- package/typechain-types/factories/BenqiChainlinkOracle__factory.ts +0 -311
- package/typechain-types/factories/BoringOwnableData__factory.ts +0 -90
- package/typechain-types/factories/BoringOwnableUpgData__factory.ts +0 -94
- package/typechain-types/factories/BoringOwnableUpg__factory.ts +0 -139
- package/typechain-types/factories/BoringOwnable__factory.ts +0 -149
- package/typechain-types/factories/CelerReceiver__factory.ts +0 -140
- package/typechain-types/factories/CelerSender__factory.ts +0 -85
- package/typechain-types/factories/ComptrollerErrorReporter__factory.ts +0 -93
- package/typechain-types/factories/ComptrollerInterface__factory.ts +0 -595
- package/typechain-types/factories/ComptrollerVXStorage__factory.ts +0 -610
- package/typechain-types/factories/Comptroller__factory.ts +0 -2189
- package/typechain-types/factories/CrosschainContract__factory.ts +0 -52
- package/typechain-types/factories/CrosschainReceiver__factory.ts +0 -187
- package/typechain-types/factories/CrosschainSender__factory.ts +0 -104
- package/typechain-types/factories/EIP20Interface__factory.ts +0 -248
- package/typechain-types/factories/EIP20NonStandardInterface__factory.ts +0 -213
- package/typechain-types/factories/ERC20Burnable__factory.ts +0 -324
- package/typechain-types/factories/ERC20Locker__factory.ts +0 -73
- package/typechain-types/factories/ERC20Permit__factory.ts +0 -368
- package/typechain-types/factories/ERC20Premined__factory.ts +0 -393
- package/typechain-types/factories/ERC20PresetFixedSupply__factory.ts +0 -422
- package/typechain-types/factories/EpochController__factory.ts +0 -170
- package/typechain-types/factories/FundKeeper__factory.ts +0 -212
- package/typechain-types/factories/GaugeTypeControllerAbstract__factory.ts +0 -387
- package/typechain-types/factories/GaugeTypeControllerCrosschain__factory.ts +0 -522
- package/typechain-types/factories/GaugeTypeControllerMainchain__factory.ts +0 -431
- package/typechain-types/factories/IERC20Permit__factory.ts +0 -98
- package/typechain-types/factories/IGaugeController__factory.ts +0 -45
- package/typechain-types/factories/IJoePair__factory.ts +0 -674
- package/typechain-types/factories/IJoeRouter01__factory.ts +0 -772
- package/typechain-types/factories/IJoeRouter02__factory.ts +0 -974
- package/typechain-types/factories/ILiquidYieldTokenWrap__factory.ts +0 -533
- package/typechain-types/factories/ILiquidYieldToken__factory.ts +0 -429
- package/typechain-types/factories/IMessageBus__factory.ts +0 -396
- package/typechain-types/factories/IMessageReceiverApp__factory.ts +0 -55
- package/typechain-types/factories/IPActionRedeem__factory.ts +0 -70
- package/typechain-types/factories/IPActionSCYAndPY__factory.ts +0 -174
- package/typechain-types/factories/IPBaseToken__factory.ts +0 -271
- package/typechain-types/factories/IPFlashCallback__factory.ts +0 -49
- package/typechain-types/factories/IPGauge__factory.ts +0 -110
- package/typechain-types/factories/IPLiquidYieldToken__factory.ts +0 -433
- package/typechain-types/factories/IPMarketAddRemoveCallback__factory.ts +0 -86
- package/typechain-types/factories/IPMarketCallback__factory.ts +0 -55
- package/typechain-types/factories/IPOwnershipToken__factory.ts +0 -349
- package/typechain-types/factories/IPRouterCore__factory.ts +0 -531
- package/typechain-types/factories/IPRouterRedeem__factory.ts +0 -72
- package/typechain-types/factories/IPRouterYT__factory.ts +0 -305
- package/typechain-types/factories/IPVotingEscrowController__factory.ts +0 -80
- package/typechain-types/factories/IPendleGauge__factory.ts +0 -125
- package/typechain-types/factories/IPermissionsV2__factory.ts +0 -39
- package/typechain-types/factories/IRainbowBridge__factory.ts +0 -76
- package/typechain-types/factories/ISCYRewardIndex__factory.ts +0 -465
- package/typechain-types/factories/IVEPendleToken__factory.ts +0 -71
- package/typechain-types/factories/IVePToken__factory.ts +0 -55
- package/typechain-types/factories/IVotingEscrowPendle__factory.ts +0 -182
- package/typechain-types/factories/IXPendle__factory.ts +0 -61
- package/typechain-types/factories/InterestRateModel__factory.ts +0 -108
- package/typechain-types/factories/JumpRateModel__factory.ts +0 -334
- package/typechain-types/factories/LYTBaseWithRewards__factory.ts +0 -530
- package/typechain-types/factories/LYTBase__factory.ts +0 -474
- package/typechain-types/factories/LYTWrapWithRewards__factory.ts +0 -643
- package/typechain-types/factories/LYTWrap__factory.ts +0 -574
- package/typechain-types/factories/LiquidityMining__factory.ts +0 -367
- package/typechain-types/factories/Maximillion__factory.ts +0 -125
- package/typechain-types/factories/Ownable__factory.ts +0 -75
- package/typechain-types/factories/PendleAaveV3LYT__factory.ts +0 -657
- package/typechain-types/factories/PendleBaseToken__factory.ts +0 -348
- package/typechain-types/factories/PendleBenQiErc20LYT__factory.ts +0 -748
- package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +0 -871
- package/typechain-types/factories/PendleBenqiLiquidYieldToken__factory.ts +0 -785
- package/typechain-types/factories/PendleBtrflyLYT__factory.ts +0 -647
- package/typechain-types/factories/PendleBtrflyScy__factory.ts +0 -710
- package/typechain-types/factories/PendleCelerRouter__factory.ts +0 -259
- package/typechain-types/factories/PendleERC20Permit__factory.ts +0 -405
- package/typechain-types/factories/PendleGaugeControllerMainchain__factory.ts +0 -332
- package/typechain-types/factories/PendleGaugeControllerSidechain__factory.ts +0 -391
- package/typechain-types/factories/PendleGaugeController__factory.ts +0 -212
- package/typechain-types/factories/PendleJoeLpSCY__factory.ts +0 -732
- package/typechain-types/factories/PendleJoeSwapHelperUpg__factory.ts +0 -43
- package/typechain-types/factories/PendleJoeSwapHelper__factory.ts +0 -52
- package/typechain-types/factories/PendleLYTMockYT__factory.ts +0 -732
- package/typechain-types/factories/PendleLiquidYieldTokenBase__factory.ts +0 -603
- package/typechain-types/factories/PendleLiquidYieldToken__factory.ts +0 -510
- package/typechain-types/factories/PendleOwnershipToken__factory.ts +0 -527
- package/typechain-types/factories/PendleRouter01__factory.ts +0 -152
- package/typechain-types/factories/PendleRouter02__factory.ts +0 -438
- package/typechain-types/factories/PendleRouter03__factory.ts +0 -190
- package/typechain-types/factories/PendleRouterBase__factory.ts +0 -68
- package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +0 -635
- package/typechain-types/factories/PendleRouterCore__factory.ts +0 -268
- package/typechain-types/factories/PendleRouterLytAndForge__factory.ts +0 -294
- package/typechain-types/factories/PendleRouterMarketBase__factory.ts +0 -43
- package/typechain-types/factories/PendleRouterOT__factory.ts +0 -372
- package/typechain-types/factories/PendleRouterProxy__factory.ts +0 -285
- package/typechain-types/factories/PendleRouterRawTokenOT__factory.ts +0 -697
- package/typechain-types/factories/PendleRouterRawTokenYT__factory.ts +0 -431
- package/typechain-types/factories/PendleRouterRedeemUpg__factory.ts +0 -112
- package/typechain-types/factories/PendleRouterSCYAndForgeBaseUpg__factory.ts +0 -56
- package/typechain-types/factories/PendleRouterStaticUpg__factory.ts +0 -315
- package/typechain-types/factories/PendleRouterYTBaseUpg__factory.ts +0 -66
- package/typechain-types/factories/PendleRouterYTUpg__factory.ts +0 -422
- package/typechain-types/factories/PendleRouterYT__factory.ts +0 -184
- package/typechain-types/factories/PendleStEthSCY__factory.ts +0 -716
- package/typechain-types/factories/PendleStargatePool__factory.ts +0 -961
- package/typechain-types/factories/PendleVotingController__factory.ts +0 -730
- package/typechain-types/factories/PendleYTLYTBenqi__factory.ts +0 -713
- package/typechain-types/factories/PendleYearnVaultLYT__factory.ts +0 -586
- package/typechain-types/factories/PermissionsV2__factory.ts +0 -36
- package/typechain-types/factories/PermlessAbstract__factory.ts +0 -30
- package/typechain-types/factories/PglStakingContractProxyStorage__factory.ts +0 -130
- package/typechain-types/factories/PglStakingContractProxy__factory.ts +0 -187
- package/typechain-types/factories/PglStakingContractStorage__factory.ts +0 -309
- package/typechain-types/factories/PglStakingContract__factory.ts +0 -446
- package/typechain-types/factories/PriceOracle__factory.ts +0 -59
- package/typechain-types/factories/ProtocolFakeUser__factory.ts +0 -87
- package/typechain-types/factories/QiAvax__factory.ts +0 -1471
- package/typechain-types/factories/QiDelegateInterface__factory.ts +0 -65
- package/typechain-types/factories/QiDelegationStorage__factory.ts +0 -79
- package/typechain-types/factories/QiDelegatorInterface__factory.ts +0 -89
- package/typechain-types/factories/QiErc20Delegate__factory.ts +0 -1563
- package/typechain-types/factories/QiErc20Delegator__factory.ts +0 -1648
- package/typechain-types/factories/QiErc20Interface__factory.ts +0 -239
- package/typechain-types/factories/QiErc20Storage__factory.ts +0 -79
- package/typechain-types/factories/QiErc20__factory.ts +0 -1515
- package/typechain-types/factories/QiTokenInterface__factory.ts +0 -1182
- package/typechain-types/factories/QiTokenSaleDistributorProxyStorage__factory.ts +0 -124
- package/typechain-types/factories/QiTokenSaleDistributorProxy__factory.ts +0 -171
- package/typechain-types/factories/QiTokenSaleDistributorStorage__factory.ts +0 -289
- package/typechain-types/factories/QiTokenSaleDistributor__factory.ts +0 -480
- package/typechain-types/factories/QiTokenStorage__factory.ts +0 -274
- package/typechain-types/factories/QiToken__factory.ts +0 -1219
- package/typechain-types/factories/Qi__factory.ts +0 -648
- package/typechain-types/factories/ReentrancyGuard__factory.ts +0 -69
- package/typechain-types/factories/SingleGaugeTypeController__factory.ts +0 -341
- package/typechain-types/factories/TokenErrorReporter__factory.ts +0 -89
- package/typechain-types/factories/UnitrollerAdminStorage__factory.ts +0 -128
- package/typechain-types/factories/Unitroller__factory.ts +0 -305
- package/typechain-types/factories/VePendleCrosschain__factory.ts +0 -727
- package/typechain-types/factories/VePendleToken__factory.ts +0 -494
- package/typechain-types/factories/VePendle__factory.ts +0 -800
- package/typechain-types/factories/VotingControllerStorage__factory.ts +0 -315
- package/typechain-types/factories/VotingController__factory.ts +0 -645
- package/typechain-types/factories/VotingEscrowPendle__factory.ts +0 -527
- package/typechain-types/factories/VotingEscrowToken__factory.ts +0 -153
- package/typechain-types/factories/WETH9__factory.ts +0 -342
- package/typechain-types/factories/WhitePaperInterestRateModel__factory.ts +0 -281
- package/typechain-types/factories/XPendle__factory.ts +0 -473
|
@@ -70,7 +70,7 @@ contract PendleVotingControllerUpg is
|
|
|
70
70
|
address user = msg.sender;
|
|
71
71
|
|
|
72
72
|
require(weights.length == pools.length, "invaid array length");
|
|
73
|
-
require(vePendle.balanceOf(user) > 0
|
|
73
|
+
require(vePendle.balanceOf(user) > 0, "zero vependle balance");
|
|
74
74
|
|
|
75
75
|
UserData storage uData = userData[user];
|
|
76
76
|
LockedPosition memory userPosition = _getUserVePendlePosition(user);
|
|
@@ -50,11 +50,13 @@ contract PendleRouter is Proxy, Initializable, UUPSUpgradeable, PermissionsV2Upg
|
|
|
50
50
|
sig == IPActionCore.redeemPyToToken.selector ||
|
|
51
51
|
sig == IPActionCore.mintPyFromScy.selector ||
|
|
52
52
|
sig == IPActionCore.redeemPyToScy.selector ||
|
|
53
|
-
sig == IPActionCore.
|
|
53
|
+
sig == IPActionCore.addLiquidityDualScyAndPt.selector ||
|
|
54
|
+
sig == IPActionCore.addLiquidityDualIbTokenAndPt.selector ||
|
|
54
55
|
sig == IPActionCore.addLiquiditySinglePt.selector ||
|
|
55
56
|
sig == IPActionCore.addLiquiditySingleScy.selector ||
|
|
56
57
|
sig == IPActionCore.addLiquiditySingleToken.selector ||
|
|
57
|
-
sig == IPActionCore.
|
|
58
|
+
sig == IPActionCore.removeLiquidityDualScyAndPt.selector ||
|
|
59
|
+
sig == IPActionCore.removeLiquidityDualIbTokenAndPt.selector ||
|
|
58
60
|
sig == IPActionCore.removeLiquiditySinglePt.selector ||
|
|
59
61
|
sig == IPActionCore.removeLiquiditySingleScy.selector ||
|
|
60
62
|
sig == IPActionCore.removeLiquiditySingleToken.selector ||
|
|
@@ -18,7 +18,7 @@ contract ActionCore is IPActionCore, ActionSCYAndPTBase {
|
|
|
18
18
|
{}
|
|
19
19
|
|
|
20
20
|
/// @dev refer to the internal function
|
|
21
|
-
function
|
|
21
|
+
function addLiquidityDualScyAndPt(
|
|
22
22
|
address receiver,
|
|
23
23
|
address market,
|
|
24
24
|
uint256 scyDesired,
|
|
@@ -32,7 +32,7 @@ contract ActionCore is IPActionCore, ActionSCYAndPTBase {
|
|
|
32
32
|
uint256 ptUsed
|
|
33
33
|
)
|
|
34
34
|
{
|
|
35
|
-
(netLpOut, scyUsed, ptUsed) =
|
|
35
|
+
(netLpOut, scyUsed, ptUsed) = _addLiquidityDualScyAndPt(
|
|
36
36
|
receiver,
|
|
37
37
|
market,
|
|
38
38
|
scyDesired,
|
|
@@ -40,7 +40,39 @@ contract ActionCore is IPActionCore, ActionSCYAndPTBase {
|
|
|
40
40
|
minLpOut,
|
|
41
41
|
true
|
|
42
42
|
);
|
|
43
|
-
emit
|
|
43
|
+
emit AddLiquidityDualScyAndPt(msg.sender, market, receiver, scyUsed, ptUsed, netLpOut);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/// @dev refer to the internal function
|
|
47
|
+
function addLiquidityDualIbTokenAndPt(
|
|
48
|
+
address receiver,
|
|
49
|
+
address market,
|
|
50
|
+
uint256 ibTokenDesired,
|
|
51
|
+
uint256 ptDesired,
|
|
52
|
+
uint256 minLpOut
|
|
53
|
+
)
|
|
54
|
+
external
|
|
55
|
+
returns (
|
|
56
|
+
uint256 netLpOut,
|
|
57
|
+
uint256 ibTokenUsed,
|
|
58
|
+
uint256 ptUsed
|
|
59
|
+
)
|
|
60
|
+
{
|
|
61
|
+
(netLpOut, ibTokenUsed, ptUsed) = _addLiquidityDualIbTokenAndPt(
|
|
62
|
+
receiver,
|
|
63
|
+
market,
|
|
64
|
+
ibTokenDesired,
|
|
65
|
+
ptDesired,
|
|
66
|
+
minLpOut
|
|
67
|
+
);
|
|
68
|
+
emit AddLiquidityDualIbTokenAndPt(
|
|
69
|
+
msg.sender,
|
|
70
|
+
market,
|
|
71
|
+
receiver,
|
|
72
|
+
ibTokenDesired,
|
|
73
|
+
ptUsed,
|
|
74
|
+
netLpOut
|
|
75
|
+
);
|
|
44
76
|
}
|
|
45
77
|
|
|
46
78
|
function addLiquiditySinglePt(
|
|
@@ -74,22 +106,53 @@ contract ActionCore is IPActionCore, ActionSCYAndPTBase {
|
|
|
74
106
|
}
|
|
75
107
|
|
|
76
108
|
/// @dev refer to the internal function
|
|
77
|
-
function
|
|
109
|
+
function removeLiquidityDualScyAndPt(
|
|
78
110
|
address receiver,
|
|
79
111
|
address market,
|
|
80
112
|
uint256 lpToRemove,
|
|
81
113
|
uint256 scyOutMin,
|
|
82
114
|
uint256 ptOutMin
|
|
83
115
|
) external returns (uint256 netScyOut, uint256 netPtOut) {
|
|
84
|
-
(netScyOut, netPtOut) =
|
|
116
|
+
(netScyOut, netPtOut) = _removeLiquidityDualScyAndPt(
|
|
85
117
|
receiver,
|
|
86
118
|
market,
|
|
87
119
|
lpToRemove,
|
|
88
120
|
scyOutMin,
|
|
89
|
-
ptOutMin
|
|
90
|
-
|
|
121
|
+
ptOutMin
|
|
122
|
+
);
|
|
123
|
+
emit RemoveLiquidityDualScyAndPt(
|
|
124
|
+
msg.sender,
|
|
125
|
+
market,
|
|
126
|
+
receiver,
|
|
127
|
+
lpToRemove,
|
|
128
|
+
netPtOut,
|
|
129
|
+
netScyOut
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/// @dev refer to the internal function
|
|
134
|
+
function removeLiquidityDualIbTokenAndPt(
|
|
135
|
+
address receiver,
|
|
136
|
+
address market,
|
|
137
|
+
uint256 lpToRemove,
|
|
138
|
+
uint256 ibTokenMin,
|
|
139
|
+
uint256 ptOutMin
|
|
140
|
+
) external returns (uint256 netIbTokenOut, uint256 netPtOut) {
|
|
141
|
+
(netIbTokenOut, netPtOut) = _removeLiquidityDualIbTokenAndPt(
|
|
142
|
+
receiver,
|
|
143
|
+
market,
|
|
144
|
+
lpToRemove,
|
|
145
|
+
ibTokenMin,
|
|
146
|
+
ptOutMin
|
|
147
|
+
);
|
|
148
|
+
emit RemoveLiquidityDualIbTokenAndPt(
|
|
149
|
+
msg.sender,
|
|
150
|
+
market,
|
|
151
|
+
receiver,
|
|
152
|
+
lpToRemove,
|
|
153
|
+
netPtOut,
|
|
154
|
+
netIbTokenOut
|
|
91
155
|
);
|
|
92
|
-
emit RemoveLiquidity(msg.sender, market, receiver, lpToRemove, netPtOut, netScyOut);
|
|
93
156
|
}
|
|
94
157
|
|
|
95
158
|
function removeLiquiditySinglePt(
|
|
@@ -23,7 +23,7 @@ abstract contract ActionSCYAndPTBase is ActionSCYAndPYBase {
|
|
|
23
23
|
/// @dev For doPull: if doPull is true, this function will do transferFrom as necessary from msg.sender. Else, it will
|
|
24
24
|
/// assume tokens have already been transferred in.
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function _addLiquidityDualScyAndPt(
|
|
27
27
|
address receiver,
|
|
28
28
|
address market,
|
|
29
29
|
uint256 scyDesired,
|
|
@@ -63,31 +63,88 @@ abstract contract ActionSCYAndPTBase is ActionSCYAndPYBase {
|
|
|
63
63
|
require(netLpOut >= minLpOut, "FS insufficient lp out");
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
function
|
|
66
|
+
function _addLiquidityDualIbTokenAndPt(
|
|
67
|
+
address receiver,
|
|
68
|
+
address market,
|
|
69
|
+
uint256 ibTokenDesired,
|
|
70
|
+
uint256 ptDesired,
|
|
71
|
+
uint256 minLpOut
|
|
72
|
+
)
|
|
73
|
+
internal
|
|
74
|
+
returns (
|
|
75
|
+
uint256 netLpOut,
|
|
76
|
+
uint256 ibTokenUsed,
|
|
77
|
+
uint256 ptUsed
|
|
78
|
+
)
|
|
79
|
+
{
|
|
80
|
+
(ISuperComposableYield SCY, IPPrincipalToken PT, IPYieldToken YT) = IPMarket(market)
|
|
81
|
+
.readTokens();
|
|
82
|
+
|
|
83
|
+
address ibToken = SCY.yieldToken();
|
|
84
|
+
uint256 scyDesired = SCY.previewDeposit(ibToken, ibTokenDesired);
|
|
85
|
+
uint256 scyUsed;
|
|
86
|
+
|
|
87
|
+
{
|
|
88
|
+
MarketState memory state = IPMarket(market).readState(false);
|
|
89
|
+
(, netLpOut, scyUsed, ptUsed) = state.addLiquidity(
|
|
90
|
+
YT.newIndex(),
|
|
91
|
+
scyDesired,
|
|
92
|
+
ptDesired,
|
|
93
|
+
block.timestamp
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// early-check
|
|
98
|
+
require(netLpOut >= minLpOut, "insufficient lp out");
|
|
99
|
+
|
|
100
|
+
IERC20(PT).safeTransferFrom(msg.sender, market, ptUsed);
|
|
101
|
+
|
|
102
|
+
// convert ibToken to SCY to deposit
|
|
103
|
+
ibTokenUsed = (ibTokenDesired * scyUsed).rawDivUp(scyDesired);
|
|
104
|
+
|
|
105
|
+
IERC20(ibToken).safeTransferFrom(msg.sender, address(this), ibTokenUsed);
|
|
106
|
+
|
|
107
|
+
_safeApproveInf(ibToken, address(SCY));
|
|
108
|
+
|
|
109
|
+
SCY.deposit(market, ibToken, ibTokenUsed, scyDesired);
|
|
110
|
+
|
|
111
|
+
netLpOut = IPMarket(market).mint(receiver);
|
|
112
|
+
// fail-safe
|
|
113
|
+
require(netLpOut >= minLpOut, "FS insufficient lp out");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function _removeLiquidityDualScyAndPt(
|
|
67
117
|
address receiver,
|
|
68
118
|
address market,
|
|
69
119
|
uint256 lpToRemove,
|
|
70
120
|
uint256 scyOutMin,
|
|
71
|
-
uint256 ptOutMin
|
|
72
|
-
bool doPull
|
|
121
|
+
uint256 ptOutMin
|
|
73
122
|
) internal returns (uint256 netScyOut, uint256 netPtOut) {
|
|
74
|
-
|
|
123
|
+
IERC20(market).safeTransferFrom(msg.sender, market, lpToRemove);
|
|
75
124
|
|
|
76
|
-
(netScyOut, netPtOut) =
|
|
125
|
+
(netScyOut, netPtOut) = IPMarket(market).burn(receiver, receiver);
|
|
77
126
|
|
|
78
|
-
// early-check
|
|
79
127
|
require(netScyOut >= scyOutMin, "insufficient SCY out");
|
|
80
128
|
require(netPtOut >= ptOutMin, "insufficient PT out");
|
|
129
|
+
}
|
|
81
130
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
131
|
+
function _removeLiquidityDualIbTokenAndPt(
|
|
132
|
+
address receiver,
|
|
133
|
+
address market,
|
|
134
|
+
uint256 lpToRemove,
|
|
135
|
+
uint256 ibTokenOutMin,
|
|
136
|
+
uint256 ptOutMin
|
|
137
|
+
) internal returns (uint256 netIbTokenOut, uint256 netPtOut) {
|
|
138
|
+
(ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
|
|
139
|
+
address ibToken = SCY.yieldToken();
|
|
85
140
|
|
|
86
|
-
(
|
|
141
|
+
IERC20(market).safeTransferFrom(msg.sender, market, lpToRemove);
|
|
87
142
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
143
|
+
(, netPtOut) = IPMarket(market).burn(address(SCY), receiver);
|
|
144
|
+
|
|
145
|
+
netIbTokenOut = SCY.redeemAfterTransfer(receiver, ibToken, ibTokenOutMin);
|
|
146
|
+
|
|
147
|
+
require(netPtOut >= ptOutMin, "insufficient PT out");
|
|
91
148
|
}
|
|
92
149
|
|
|
93
150
|
function _swapExactPtForScy(
|
|
@@ -201,7 +201,7 @@ abstract contract ActionSCYAndYTBase is ActionSCYAndPYBase, CallbackHelper {
|
|
|
201
201
|
) internal returns (uint256 netTokenOut) {
|
|
202
202
|
(ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
|
|
203
203
|
|
|
204
|
-
uint256 netScyOut = _swapExactYtForScy(
|
|
204
|
+
uint256 netScyOut = _swapExactYtForScy(address(SCY), market, netYtIn, 1, doPull);
|
|
205
205
|
|
|
206
206
|
netTokenOut = _redeemScyToToken(receiver, address(SCY), netScyOut, output, false);
|
|
207
207
|
}
|
|
@@ -5,7 +5,7 @@ import "../libraries/math/MarketApproxLib.sol";
|
|
|
5
5
|
import "../libraries/kyberswap/KyberSwapHelper.sol";
|
|
6
6
|
|
|
7
7
|
interface IPActionCore {
|
|
8
|
-
event
|
|
8
|
+
event AddLiquidityDualScyAndPt(
|
|
9
9
|
address indexed caller,
|
|
10
10
|
address indexed market,
|
|
11
11
|
address indexed receiver,
|
|
@@ -14,7 +14,16 @@ interface IPActionCore {
|
|
|
14
14
|
uint256 lpOut
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
event
|
|
17
|
+
event AddLiquidityDualIbTokenAndPt(
|
|
18
|
+
address indexed caller,
|
|
19
|
+
address indexed market,
|
|
20
|
+
address indexed receiver,
|
|
21
|
+
uint256 ibTokenUsed,
|
|
22
|
+
uint256 ptUsed,
|
|
23
|
+
uint256 lpOut
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
event RemoveLiquidityDualScyAndPt(
|
|
18
27
|
address indexed caller,
|
|
19
28
|
address indexed market,
|
|
20
29
|
address receiver,
|
|
@@ -23,6 +32,15 @@ interface IPActionCore {
|
|
|
23
32
|
uint256 amountSCYOut
|
|
24
33
|
);
|
|
25
34
|
|
|
35
|
+
event RemoveLiquidityDualIbTokenAndPt(
|
|
36
|
+
address indexed caller,
|
|
37
|
+
address indexed market,
|
|
38
|
+
address receiver,
|
|
39
|
+
uint256 lpIn,
|
|
40
|
+
uint256 amountPTOut,
|
|
41
|
+
uint256 amountIbTokenOut
|
|
42
|
+
);
|
|
43
|
+
|
|
26
44
|
event SwapPtAndScy(
|
|
27
45
|
address indexed caller,
|
|
28
46
|
address indexed market,
|
|
@@ -92,7 +110,7 @@ interface IPActionCore {
|
|
|
92
110
|
uint256 netTokenOut
|
|
93
111
|
);
|
|
94
112
|
|
|
95
|
-
function
|
|
113
|
+
function addLiquidityDualScyAndPt(
|
|
96
114
|
address receiver,
|
|
97
115
|
address market,
|
|
98
116
|
uint256 scyDesired,
|
|
@@ -106,6 +124,21 @@ interface IPActionCore {
|
|
|
106
124
|
uint256 ptUsed
|
|
107
125
|
);
|
|
108
126
|
|
|
127
|
+
/// @dev refer to the internal function
|
|
128
|
+
function addLiquidityDualIbTokenAndPt(
|
|
129
|
+
address receiver,
|
|
130
|
+
address market,
|
|
131
|
+
uint256 ibTokenDesired,
|
|
132
|
+
uint256 ptDesired,
|
|
133
|
+
uint256 minLpOut
|
|
134
|
+
)
|
|
135
|
+
external
|
|
136
|
+
returns (
|
|
137
|
+
uint256 netLpOut,
|
|
138
|
+
uint256 ibTokenUsed,
|
|
139
|
+
uint256 ptUsed
|
|
140
|
+
);
|
|
141
|
+
|
|
109
142
|
function addLiquiditySinglePt(
|
|
110
143
|
address receiver,
|
|
111
144
|
address market,
|
|
@@ -130,7 +163,7 @@ interface IPActionCore {
|
|
|
130
163
|
TokenInput calldata input
|
|
131
164
|
) external returns (uint256 netLpOut);
|
|
132
165
|
|
|
133
|
-
function
|
|
166
|
+
function removeLiquidityDualScyAndPt(
|
|
134
167
|
address receiver,
|
|
135
168
|
address market,
|
|
136
169
|
uint256 lpToRemove,
|
|
@@ -138,6 +171,15 @@ interface IPActionCore {
|
|
|
138
171
|
uint256 ptOutMin
|
|
139
172
|
) external returns (uint256 netScyOut, uint256 netPtOut);
|
|
140
173
|
|
|
174
|
+
/// @dev refer to the internal function
|
|
175
|
+
function removeLiquidityDualIbTokenAndPt(
|
|
176
|
+
address receiver,
|
|
177
|
+
address market,
|
|
178
|
+
uint256 lpToRemove,
|
|
179
|
+
uint256 ibTokenMin,
|
|
180
|
+
uint256 ptOutMin
|
|
181
|
+
) external returns (uint256 netIbTokenOut, uint256 netPtOut);
|
|
182
|
+
|
|
141
183
|
function removeLiquiditySinglePt(
|
|
142
184
|
address receiver,
|
|
143
185
|
address market,
|
|
@@ -86,7 +86,7 @@ interface IPRouterStatic {
|
|
|
86
86
|
|
|
87
87
|
// ============= MARKET ACTIONS =============
|
|
88
88
|
|
|
89
|
-
function
|
|
89
|
+
function addLiquidityDualScyAndPtStatic(
|
|
90
90
|
address market,
|
|
91
91
|
uint256 scyDesired,
|
|
92
92
|
uint256 ptDesired
|
|
@@ -98,7 +98,7 @@ interface IPRouterStatic {
|
|
|
98
98
|
uint256 ptUsed
|
|
99
99
|
);
|
|
100
100
|
|
|
101
|
-
function
|
|
101
|
+
function removeLiquidityDualScyAndPtStatic(address market, uint256 lpToRemove)
|
|
102
102
|
external
|
|
103
103
|
view
|
|
104
104
|
returns (uint256 netScyOut, uint256 netPtOut);
|
|
@@ -139,7 +139,7 @@ contract RouterStatic is IPRouterStatic {
|
|
|
139
139
|
|
|
140
140
|
// ============= MARKET ACTIONS =============
|
|
141
141
|
|
|
142
|
-
function
|
|
142
|
+
function addLiquidityDualScyAndPtStatic(
|
|
143
143
|
address market,
|
|
144
144
|
uint256 scyDesired,
|
|
145
145
|
uint256 ptDesired
|
|
@@ -160,6 +160,35 @@ contract RouterStatic is IPRouterStatic {
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
function addLiquidityDualIbTokenAndPtStatic(
|
|
164
|
+
address market,
|
|
165
|
+
uint256 ibTokenDesired,
|
|
166
|
+
uint256 ptDesired
|
|
167
|
+
)
|
|
168
|
+
external
|
|
169
|
+
returns (
|
|
170
|
+
uint256 netLpOut,
|
|
171
|
+
uint256 ibTokenUsed,
|
|
172
|
+
uint256 ptUsed
|
|
173
|
+
)
|
|
174
|
+
{
|
|
175
|
+
(ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
|
|
176
|
+
|
|
177
|
+
address ibToken = SCY.yieldToken();
|
|
178
|
+
uint256 scyDesired = SCY.previewDeposit(ibToken, ibTokenDesired);
|
|
179
|
+
uint256 scyUsed;
|
|
180
|
+
|
|
181
|
+
MarketState memory state = IPMarket(market).readState(false);
|
|
182
|
+
(, netLpOut, scyUsed, ptUsed) = state.addLiquidity(
|
|
183
|
+
pyIndex(market),
|
|
184
|
+
scyDesired,
|
|
185
|
+
ptDesired,
|
|
186
|
+
block.timestamp
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
ibTokenUsed = (ibTokenDesired * scyUsed).rawDivUp(scyDesired);
|
|
190
|
+
}
|
|
191
|
+
|
|
163
192
|
function addLiquiditySinglePtStatic(address market, uint256 netPtIn)
|
|
164
193
|
external
|
|
165
194
|
returns (
|
|
@@ -197,13 +226,20 @@ contract RouterStatic is IPRouterStatic {
|
|
|
197
226
|
require(false, "NOT IMPLEMENTED");
|
|
198
227
|
}
|
|
199
228
|
|
|
200
|
-
function
|
|
229
|
+
function removeLiquidityDualScyAndPtStatic(address market, uint256 lpToRemove)
|
|
201
230
|
external
|
|
202
231
|
view
|
|
203
|
-
returns (uint256
|
|
232
|
+
returns (uint256 netIbTokenOut, uint256 netPtOut)
|
|
204
233
|
{
|
|
234
|
+
(ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
|
|
235
|
+
|
|
236
|
+
address ibToken = SCY.yieldToken();
|
|
237
|
+
|
|
238
|
+
uint256 netScyOut;
|
|
205
239
|
MarketState memory state = IPMarket(market).readState(false);
|
|
206
240
|
(netScyOut, netPtOut) = state.removeLiquidity(lpToRemove);
|
|
241
|
+
|
|
242
|
+
netIbTokenOut = SCY.previewRedeem(ibToken, netScyOut);
|
|
207
243
|
}
|
|
208
244
|
|
|
209
245
|
function removeLiquiditySinglePtStatic(address market, uint256 lpToRemove)
|
package/package.json
CHANGED