@pendle/core-v2 2.11.0-mainnet → 2.13.0-mainnet
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +592 -0
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +79 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +77 -0
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.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/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.json +252 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.json +89 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.json +338 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +1464 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.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/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.json +2 -2
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotFactory.sol/ICamelotFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotFactory.sol/ICamelotFactory.json +237 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.json +56 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.json +142 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.json +402 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.json +438 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.json +729 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.json +647 -0
- package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.json +350 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.json +77 -0
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +224 -0
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +15 -0
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol +170 -0
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol +38 -0
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol +146 -0
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol +177 -0
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol +251 -0
- package/contracts/core/libraries/math/Math.sol +19 -3
- package/contracts/interfaces/Camelot/ICamelotFactory.sol +22 -0
- package/contracts/interfaces/Camelot/ICamelotNFTFactory.sol +11 -0
- package/contracts/interfaces/Camelot/ICamelotNFTHandler.sol +26 -0
- package/contracts/interfaces/Camelot/ICamelotNFTPool.sol +19 -0
- package/contracts/interfaces/Camelot/ICamelotNitroPool.sol +28 -0
- package/contracts/interfaces/Camelot/ICamelotPair.sol +109 -0
- package/contracts/interfaces/Camelot/ICamelotRouter.sol +127 -0
- package/contracts/interfaces/Camelot/IXGrail.sol +31 -0
- package/contracts/interfaces/IPVotingController.sol +10 -0
- package/deployments/42161-markets/CAMELOT-PEP-27JUNE2024-ARBITRUM.json +10 -0
- package/package.json +1 -1
- package/typechain-types/CamelotRewardHelper.ts +347 -0
- package/typechain-types/CamelotV1VolatileLpHelper.ts +152 -0
- package/typechain-types/CamelotV1VolatilePreview.ts +479 -0
- package/typechain-types/ICamelotFactory.ts +375 -0
- package/typechain-types/ICamelotNFTFactory.ts +122 -0
- package/typechain-types/ICamelotNFTHandler.ts +262 -0
- package/typechain-types/ICamelotNFTPool.ts +710 -0
- package/typechain-types/ICamelotNitroPool.ts +689 -0
- package/typechain-types/ICamelotPair.ts +16 -0
- package/typechain-types/IERC165.ts +102 -0
- package/typechain-types/IERC721.ts +487 -0
- package/typechain-types/IPVotingController.ts +93 -0
- package/typechain-types/IXGrail.ts +603 -0
- package/typechain-types/PendleCamelotV1VolatileSY.ts +1929 -0
- package/typechain-types/PendleVotingControllerUpg.ts +93 -0
- package/typechain-types/VotingControllerStorageUpg.ts +93 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
- package/typechain-types/factories/BulkSeller__factory.ts +1 -1
- package/typechain-types/factories/CamelotRewardHelper__factory.ts +313 -0
- package/typechain-types/factories/CamelotV1VolatileLpHelper__factory.ts +108 -0
- package/typechain-types/factories/CamelotV1VolatilePreview__factory.ts +400 -0
- package/typechain-types/factories/ICamelotFactory__factory.ts +252 -0
- package/typechain-types/factories/ICamelotNFTFactory__factory.ts +71 -0
- package/typechain-types/factories/ICamelotNFTHandler__factory.ts +157 -0
- package/typechain-types/factories/ICamelotNFTPool__factory.ts +417 -0
- package/typechain-types/factories/ICamelotNitroPool__factory.ts +453 -0
- package/typechain-types/factories/ICamelotPair__factory.ts +13 -0
- package/typechain-types/factories/IERC165__factory.ts +42 -0
- package/typechain-types/factories/IERC721__factory.ts +308 -0
- package/typechain-types/factories/IPVotingController__factory.ts +77 -0
- package/typechain-types/factories/IXGrail__factory.ts +362 -0
- package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1557 -0
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGDaiSY__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/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__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/PendlePtGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePtUsdChainlinkOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +78 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +77 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +135 -0
- package/typechain-types/index.ts +30 -0
|
@@ -1025,8 +1025,8 @@
|
|
|
1025
1025
|
"type": "receive"
|
|
1026
1026
|
}
|
|
1027
1027
|
],
|
|
1028
|
-
"bytecode": "0x60c06040523480156200001157600080fd5b50604051620024c0380380620024c08339810160408190526200003491620002e8565b6001600160a01b0382166080526200004e81600162000073565b6001600160a01b031660a08190526080516200006b9190620000e9565b5050620003eb565b604051634a83e9cd60e11b8152600481018290526000906001600160a01b03841690639507d39a90602401602060405180830381865afa158015620000bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e2919062000327565b9392505050565b6001600160a01b038216620000fc575050565b6200011060026001600160601b0362000347565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156200016a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019091906200037c565b1015620001b457620001a582826000620001b8565b620001b48282600019620001b8565b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169162000216919062000396565b6000604051808303816000865af19150503d806000811462000255576040519150601f19603f3d011682016040523d82523d6000602084013e6200025a565b606091505b50915091508180156200028857508051158062000288575080806020019051810190620002889190620003c7565b620002c85760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b604482015260640160405180910390fd5b5050505050565b6001600160a01b0381168114620002e557600080fd5b50565b60008060408385031215620002fc57600080fd5b82516200030981620002cf565b60208401519092506200031c81620002cf565b809150509250929050565b6000602082840312156200033a57600080fd5b8151620000e281620002cf565b60006001600160601b03838116806200037057634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6000602082840312156200038f57600080fd5b5051919050565b6000825160005b81811015620003b957602081860181015185830152016200039d565b506000920191825250919050565b600060208284031215620003da57600080fd5b81518015158114620000e257600080fd5b60805160a051612040620004806000396000818161012201528181610260015281816102b70152818161085e01526108860152600081816098015281816102f701528181610479015281816104a70152818161068f015281816108b1015281816108df01528181610bb001528181610bde01528181610d1601528181610d4401528181610ef90152610f2701526120406000f3fe60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a2646970667358221220c03b9b606e0b6df6d91dcef66f3759381ac64df815aaa8ec98edca39f96c5f6a64736f6c63430008110033",
|
|
1029
|
-
"deployedBytecode": "0x60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a2646970667358221220c03b9b606e0b6df6d91dcef66f3759381ac64df815aaa8ec98edca39f96c5f6a64736f6c63430008110033",
|
|
1028
|
+
"bytecode": "0x60c06040523480156200001157600080fd5b50604051620024c0380380620024c08339810160408190526200003491620002e8565b6001600160a01b0382166080526200004e81600162000073565b6001600160a01b031660a08190526080516200006b9190620000e9565b5050620003eb565b604051634a83e9cd60e11b8152600481018290526000906001600160a01b03841690639507d39a90602401602060405180830381865afa158015620000bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e2919062000327565b9392505050565b6001600160a01b038216620000fc575050565b6200011060026001600160601b0362000347565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156200016a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019091906200037c565b1015620001b457620001a582826000620001b8565b620001b48282600019620001b8565b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169162000216919062000396565b6000604051808303816000865af19150503d806000811462000255576040519150601f19603f3d011682016040523d82523d6000602084013e6200025a565b606091505b50915091508180156200028857508051158062000288575080806020019051810190620002889190620003c7565b620002c85760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b604482015260640160405180910390fd5b5050505050565b6001600160a01b0381168114620002e557600080fd5b50565b60008060408385031215620002fc57600080fd5b82516200030981620002cf565b60208401519092506200031c81620002cf565b809150509250929050565b6000602082840312156200033a57600080fd5b8151620000e281620002cf565b60006001600160601b03838116806200037057634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6000602082840312156200038f57600080fd5b5051919050565b6000825160005b81811015620003b957602081860181015185830152016200039d565b506000920191825250919050565b600060208284031215620003da57600080fd5b81518015158114620000e257600080fd5b60805160a051612040620004806000396000818161012201528181610260015281816102b70152818161085e01526108860152600081816098015281816102f701528181610479015281816104a70152818161068f015281816108b1015281816108df01528181610bb001528181610bde01528181610d1601528181610d4401528181610ef90152610f2701526120406000f3fe60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a2646970667358221220b33c978afa5090f4eb5bfcc1b53ee7bfa9a9158b27751d6fd9ee28d08d19d45364736f6c63430008110033",
|
|
1029
|
+
"deployedBytecode": "0x60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a2646970667358221220b33c978afa5090f4eb5bfcc1b53ee7bfa9a9158b27751d6fd9ee28d08d19d45364736f6c63430008110033",
|
|
1030
1030
|
"linkReferences": {},
|
|
1031
1031
|
"deployedLinkReferences": {}
|
|
1032
1032
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtInLib",
|
|
4
4
|
"sourceName": "contracts/router/base/MarketApproxLib.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a7aaf7fec42f8d6702a0d35c7cea3e5dc139baa7e77a324c2830fbd4f00bb2fd64736f6c63430008110033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a7aaf7fec42f8d6702a0d35c7cea3e5dc139baa7e77a324c2830fbd4f00bb2fd64736f6c63430008110033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtOutLib",
|
|
4
4
|
"sourceName": "contracts/router/base/MarketApproxLib.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205f3d7c3fb46505ed25b542653151682a6b78f8e7a959cfd27013d08ede3d10ff64736f6c63430008110033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205f3d7c3fb46505ed25b542653151682a6b78f8e7a959cfd27013d08ede3d10ff64736f6c63430008110033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
6
|
+
import "../../core/libraries/BoringOwnableUpgradeable.sol";
|
|
7
|
+
import "../../core/libraries/Errors.sol";
|
|
8
|
+
import "../../interfaces/IPFeeDistributor.sol";
|
|
9
|
+
import "../../interfaces/IPVotingEscrowMainchain.sol";
|
|
10
|
+
import "../../interfaces/IPVotingController.sol";
|
|
11
|
+
import "../libraries/WeekMath.sol";
|
|
12
|
+
import "../libraries/VeHistoryLib.sol";
|
|
13
|
+
import "../../core/libraries/ArrayLib.sol";
|
|
14
|
+
|
|
15
|
+
contract PendleFeeDistributor is UUPSUpgradeable, BoringOwnableUpgradeable, IPFeeDistributor {
|
|
16
|
+
using SafeERC20 for IERC20;
|
|
17
|
+
using VeBalanceLib for VeBalance;
|
|
18
|
+
using ArrayLib for uint256[];
|
|
19
|
+
|
|
20
|
+
address public immutable votingController;
|
|
21
|
+
address public immutable vePendle;
|
|
22
|
+
address public immutable token;
|
|
23
|
+
|
|
24
|
+
address[] public allPools;
|
|
25
|
+
|
|
26
|
+
// [pool] => lastFundedWeek
|
|
27
|
+
mapping(address => uint256) public lastFundedWeek;
|
|
28
|
+
|
|
29
|
+
// [pool, user] => UserInfo
|
|
30
|
+
mapping(address => mapping(address => UserInfo)) public userInfo;
|
|
31
|
+
|
|
32
|
+
// [pool, epoch] => [fee]
|
|
33
|
+
mapping(address => mapping(uint256 => uint256)) public fees;
|
|
34
|
+
|
|
35
|
+
modifier ensureValidPool(address pool) {
|
|
36
|
+
if (lastFundedWeek[pool] == 0) revert Errors.FDInvalidPool(pool);
|
|
37
|
+
_;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
address _votingController,
|
|
42
|
+
address _vePendle,
|
|
43
|
+
address _rewardToken
|
|
44
|
+
) initializer {
|
|
45
|
+
votingController = _votingController;
|
|
46
|
+
vePendle = _vePendle;
|
|
47
|
+
token = _rewardToken;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function addPool(address pool, uint256 _startWeek) external onlyOwner {
|
|
51
|
+
if (!WeekMath.isValidWTime(_startWeek) || _startWeek == 0)
|
|
52
|
+
revert Errors.FDInvalidStartEpoch(_startWeek);
|
|
53
|
+
|
|
54
|
+
if (lastFundedWeek[pool] != 0) revert Errors.FDPoolAlreadyExists(pool);
|
|
55
|
+
|
|
56
|
+
lastFundedWeek[pool] = _startWeek - WeekMath.WEEK;
|
|
57
|
+
allPools.push(pool);
|
|
58
|
+
|
|
59
|
+
emit PoolAdded(pool, _startWeek);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getAllPools() external view returns (address[] memory) {
|
|
63
|
+
return allPools;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function fund(
|
|
67
|
+
address[] calldata pools,
|
|
68
|
+
uint256[][] calldata wTimes,
|
|
69
|
+
uint256[][] calldata amounts,
|
|
70
|
+
uint256 totalAmountToFund
|
|
71
|
+
) external onlyOwner {
|
|
72
|
+
uint256 length = pools.length;
|
|
73
|
+
if (wTimes.length != length || amounts.length != length)
|
|
74
|
+
revert Errors.ArrayLengthMismatch();
|
|
75
|
+
|
|
76
|
+
uint256 totalFunded = 0;
|
|
77
|
+
for (uint256 i = 0; i < length; ++i) {
|
|
78
|
+
_fund(pools[i], wTimes[i], amounts[i]);
|
|
79
|
+
totalFunded += amounts[i].sum();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (totalFunded != totalAmountToFund)
|
|
83
|
+
revert Errors.FDTotalAmountFundedNotMatch(totalFunded, totalAmountToFund);
|
|
84
|
+
|
|
85
|
+
IERC20(token).transferFrom(msg.sender, address(this), totalFunded);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function _fund(
|
|
89
|
+
address pool,
|
|
90
|
+
uint256[] calldata wTimes,
|
|
91
|
+
uint256[] calldata amounts
|
|
92
|
+
) internal ensureValidPool(pool) {
|
|
93
|
+
if (wTimes.length != amounts.length) revert Errors.FDEpochLengthMismatch();
|
|
94
|
+
|
|
95
|
+
uint256 lastFunded = lastFundedWeek[pool];
|
|
96
|
+
|
|
97
|
+
uint256 curWeek = WeekMath.getCurrentWeekStart();
|
|
98
|
+
|
|
99
|
+
for (uint256 i = 0; i < amounts.length; ++i) {
|
|
100
|
+
uint256 wTime = wTimes[i];
|
|
101
|
+
uint256 amount = amounts[i];
|
|
102
|
+
|
|
103
|
+
if (wTime != lastFunded + WeekMath.WEEK)
|
|
104
|
+
revert Errors.FDInvalidWTimeFund(lastFunded, wTime);
|
|
105
|
+
|
|
106
|
+
fees[pool][wTime] += amount;
|
|
107
|
+
lastFunded += WeekMath.WEEK;
|
|
108
|
+
|
|
109
|
+
emit UpdateFee(pool, wTime, amount);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (lastFunded >= curWeek) revert Errors.FDInvalidWTimeFund(lastFunded, curWeek);
|
|
113
|
+
|
|
114
|
+
lastFundedWeek[pool] = lastFunded;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function claimReward(address user, address[] calldata pools)
|
|
118
|
+
external
|
|
119
|
+
returns (uint256[] memory amountRewardOut)
|
|
120
|
+
{
|
|
121
|
+
amountRewardOut = new uint256[](pools.length);
|
|
122
|
+
for (uint256 i = 0; i < pools.length; ) {
|
|
123
|
+
amountRewardOut[i] = _accumulateUserReward(pools[i], user);
|
|
124
|
+
unchecked {
|
|
125
|
+
i++;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
IERC20(token).safeTransfer(user, amountRewardOut.sum());
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function getAllActivePools() external view returns (address[] memory) {
|
|
132
|
+
return allPools;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function _accumulateUserReward(address pool, address user)
|
|
136
|
+
internal
|
|
137
|
+
ensureValidPool(pool)
|
|
138
|
+
returns (uint256 totalReward)
|
|
139
|
+
{
|
|
140
|
+
uint256 length = _getUserCheckpointLength(pool, user);
|
|
141
|
+
if (length == 0) return 0;
|
|
142
|
+
|
|
143
|
+
uint256 lastWeek = lastFundedWeek[pool];
|
|
144
|
+
uint256 curWeek = userInfo[pool][user].firstUnclaimedWeek;
|
|
145
|
+
uint256 iter = userInfo[pool][user].iter;
|
|
146
|
+
|
|
147
|
+
if (curWeek > lastWeek) return 0; // nothing to account
|
|
148
|
+
|
|
149
|
+
Checkpoint memory checkpoint = _getUserCheckpointAt(pool, user, iter);
|
|
150
|
+
Checkpoint memory nextCheckpoint = checkpoint;
|
|
151
|
+
|
|
152
|
+
if (curWeek == 0) curWeek = checkpoint.timestamp + WeekMath.WEEK;
|
|
153
|
+
|
|
154
|
+
while (curWeek <= lastWeek) {
|
|
155
|
+
// we have at most one checkpoint per week
|
|
156
|
+
if (iter + 1 < length) {
|
|
157
|
+
if (nextCheckpoint.timestamp == checkpoint.timestamp) {
|
|
158
|
+
// next have been assigned to current checkpoint, so we need to get the next one
|
|
159
|
+
nextCheckpoint = _getUserCheckpointAt(pool, user, iter + 1);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (nextCheckpoint.timestamp < curWeek) {
|
|
163
|
+
iter++;
|
|
164
|
+
checkpoint = nextCheckpoint;
|
|
165
|
+
}
|
|
166
|
+
// Important invariant: checkpoint[iter] < curWeek <= checkpoint[iter+1]
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// assert(checkpoint.timestamp < curWeek); should always hold
|
|
170
|
+
|
|
171
|
+
uint256 userShare = checkpoint.value.getValueAt(uint128(curWeek));
|
|
172
|
+
if (userShare != 0) {
|
|
173
|
+
uint256 totalShare = _getPoolTotalSharesAt(pool, uint128(curWeek));
|
|
174
|
+
// userShare != 0 => totalShare != 0
|
|
175
|
+
uint256 amountRewardOut = (userShare * fees[pool][curWeek]) / totalShare;
|
|
176
|
+
totalReward += amountRewardOut;
|
|
177
|
+
emit ClaimReward(pool, user, curWeek, amountRewardOut);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
curWeek += WeekMath.WEEK;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
userInfo[pool][user] = UserInfo({
|
|
184
|
+
firstUnclaimedWeek: uint128(curWeek),
|
|
185
|
+
iter: uint128(iter)
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function _getPoolTotalSharesAt(address pool, uint128 wTime) internal view returns (uint256) {
|
|
190
|
+
if (pool == vePendle) {
|
|
191
|
+
return IPVotingEscrowMainchain(vePendle).totalSupplyAt(wTime);
|
|
192
|
+
} else {
|
|
193
|
+
return IPVotingController(votingController).getPoolTotalVoteAt(pool, wTime);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function _getUserCheckpointAt(
|
|
198
|
+
address pool,
|
|
199
|
+
address user,
|
|
200
|
+
uint256 index
|
|
201
|
+
) internal view returns (Checkpoint memory) {
|
|
202
|
+
if (pool == vePendle) {
|
|
203
|
+
return IPVotingEscrowMainchain(vePendle).getUserHistoryAt(user, index);
|
|
204
|
+
} else {
|
|
205
|
+
return IPVotingController(votingController).getUserPoolHistoryAt(user, pool, index);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function _getUserCheckpointLength(address pool, address user) internal view returns (uint256) {
|
|
210
|
+
if (pool == vePendle) {
|
|
211
|
+
return IPVotingEscrowMainchain(vePendle).getUserHistoryLength(user);
|
|
212
|
+
} else {
|
|
213
|
+
return IPVotingController(votingController).getUserPoolHistoryLength(user, pool);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function initialize() external initializer {
|
|
218
|
+
__BoringOwnable_init();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// ----------------- upgrade-related -----------------
|
|
222
|
+
|
|
223
|
+
function _authorizeUpgrade(address) internal override onlyOwner {}
|
|
224
|
+
}
|
|
@@ -87,6 +87,21 @@ abstract contract VotingControllerStorageUpg is IPVotingController {
|
|
|
87
87
|
return weekData[wTime].poolVotes[pool];
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
/// @notice deprecated, only kept for compatibility reasons
|
|
91
|
+
function getUserPoolHistoryLength(address user, address pool) external view returns (uint256) {
|
|
92
|
+
return __dep_userPoolHistory[user][pool].length();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/// @notice deprecated, only kept for compatibility reasons
|
|
96
|
+
function getUserPoolHistoryAt(
|
|
97
|
+
address user,
|
|
98
|
+
address pool,
|
|
99
|
+
uint256 index
|
|
100
|
+
) external view returns (Checkpoint memory) {
|
|
101
|
+
return __dep_userPoolHistory[user][pool].get(index);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
90
105
|
function getPoolData(
|
|
91
106
|
address pool,
|
|
92
107
|
uint128[] calldata wTimes
|
package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.17;
|
|
4
|
+
|
|
5
|
+
import "../../../libraries/TokenHelper.sol";
|
|
6
|
+
import "../../../../interfaces/Camelot/ICamelotNFTFactory.sol";
|
|
7
|
+
import "../../../../interfaces/Camelot/ICamelotNFTPool.sol";
|
|
8
|
+
import "../../../../interfaces/Camelot/ICamelotNitroPool.sol";
|
|
9
|
+
import "../../../../interfaces/Camelot/ICamelotNFTHandler.sol";
|
|
10
|
+
import "../../../../interfaces/Camelot/IXGrail.sol";
|
|
11
|
+
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @dev This contract should leave at least MINIMUM_LIQUIDITY in NftPool position
|
|
15
|
+
* to protect the position from being destroyed
|
|
16
|
+
*
|
|
17
|
+
* The reason for this is that once the position is destroyed, the de-allocation of xGrail
|
|
18
|
+
* will be forced to occur and take away fees from our xGRAIL boosting
|
|
19
|
+
*/
|
|
20
|
+
contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
21
|
+
uint256 internal constant POSITION_UNINITIALIZED = type(uint256).max;
|
|
22
|
+
uint256 internal constant MINIMUM_LIQUIDITY = 10 ** 3;
|
|
23
|
+
bytes4 internal constant _ERC721_RECEIVED = 0x150b7a02;
|
|
24
|
+
|
|
25
|
+
uint256 public YIELD_BOOSTER_STATUS = 1;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
address public immutable nftPool;
|
|
29
|
+
address public immutable nitroPool;
|
|
30
|
+
address public immutable GRAIL;
|
|
31
|
+
address public immutable xGRAIL;
|
|
32
|
+
uint256 public positionId = POSITION_UNINITIALIZED;
|
|
33
|
+
|
|
34
|
+
address public yieldBooster;
|
|
35
|
+
|
|
36
|
+
error InvalidTokenId(uint256 tokenId, uint256 positionId);
|
|
37
|
+
|
|
38
|
+
modifier ensureValidTokenId(uint256 tokenId) {
|
|
39
|
+
// Not allow receiving NFT from unwanted sources
|
|
40
|
+
if (tokenId != positionId) {
|
|
41
|
+
revert InvalidTokenId(tokenId, positionId);
|
|
42
|
+
}
|
|
43
|
+
_;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
constructor(address _nitroPool, address _lp) {
|
|
47
|
+
nitroPool = _nitroPool;
|
|
48
|
+
nftPool = ICamelotNitroPool(nitroPool).nftPool();
|
|
49
|
+
GRAIL = ICamelotNitroPool(nitroPool).grailToken();
|
|
50
|
+
xGRAIL = ICamelotNitroPool(nitroPool).xGrailToken();
|
|
51
|
+
|
|
52
|
+
_safeApproveInf(_lp, nftPool);
|
|
53
|
+
_updateYieldBoosterAddress();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @dev Though xGRAIL can be vested into GRAIL through vesting, it's not possible
|
|
58
|
+
* to distribute this reward fairly on-chain.
|
|
59
|
+
*
|
|
60
|
+
* We decided to go with the second option (keep allocating xGRAIL to boost APR)
|
|
61
|
+
*/
|
|
62
|
+
function _allocateXGrail() internal {
|
|
63
|
+
if (YIELD_BOOSTER_STATUS == 2) return; // Yield booster update pending
|
|
64
|
+
|
|
65
|
+
uint256 amount = _selfBalance(xGRAIL);
|
|
66
|
+
if (amount == 0) return;
|
|
67
|
+
|
|
68
|
+
// there should be no reward without minimum liquidity minted
|
|
69
|
+
assert(positionId != POSITION_UNINITIALIZED);
|
|
70
|
+
|
|
71
|
+
IXGrail(xGRAIL).allocate(yieldBooster, amount, _getAllocationData());
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _prepareForReallocation() internal {
|
|
75
|
+
uint256 amountAllocated = IXGrail(xGRAIL).usageAllocations(address(this), yieldBooster);
|
|
76
|
+
IXGrail(xGRAIL).deallocate(yieldBooster, amountAllocated, _getAllocationData());
|
|
77
|
+
IXGrail(xGRAIL).approveUsage(yieldBooster, 0);
|
|
78
|
+
YIELD_BOOSTER_STATUS = 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function _finalizeReallocation() internal {
|
|
82
|
+
YIELD_BOOSTER_STATUS = 1;
|
|
83
|
+
_updateYieldBoosterAddress();
|
|
84
|
+
_allocateXGrail();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function _increaseNftPoolPosition(
|
|
88
|
+
uint256 amountLp
|
|
89
|
+
) internal returns (uint256 amountLpAccountedForUser) {
|
|
90
|
+
// first time minting from this contract
|
|
91
|
+
if (positionId == POSITION_UNINITIALIZED) {
|
|
92
|
+
positionId = ICamelotNFTPool(nftPool).lastTokenId() + 1;
|
|
93
|
+
ICamelotNFTPool(nftPool).createPosition(amountLp, 0);
|
|
94
|
+
|
|
95
|
+
// deposit nft to nitro pool (first time)
|
|
96
|
+
_depositToNitroPool();
|
|
97
|
+
|
|
98
|
+
return amountLp - MINIMUM_LIQUIDITY;
|
|
99
|
+
} else {
|
|
100
|
+
// nftPool allows adding to position even if the position is in NitroPool
|
|
101
|
+
ICamelotNFTPool(nftPool).addToPosition(positionId, amountLp);
|
|
102
|
+
return amountLp;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function _decreaseNftPoolPosition(uint256 amountLp) internal {
|
|
107
|
+
_withdrawFromNitroPool();
|
|
108
|
+
ICamelotNFTPool(nftPool).withdrawFromPosition(positionId, amountLp);
|
|
109
|
+
_depositToNitroPool();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function _depositToNitroPool() private {
|
|
113
|
+
// Nitro pool's on receive callback will execute the accounting logic
|
|
114
|
+
IERC721(nftPool).safeTransferFrom(address(this), nitroPool, positionId);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function _withdrawFromNitroPool() private {
|
|
118
|
+
ICamelotNitroPool(nitroPool).withdraw(positionId);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function _updateYieldBoosterAddress() private {
|
|
122
|
+
yieldBooster = ICamelotNFTPool(nftPool).yieldBooster();
|
|
123
|
+
IXGrail(xGRAIL).approveUsage(yieldBooster, type(uint256).max);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function _getAllocationData() private view returns (bytes memory) {
|
|
127
|
+
return abi.encode(nftPool, positionId);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* ==================================================================
|
|
132
|
+
* CAMELOT NFT RELATED
|
|
133
|
+
* ==================================================================
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
function onERC721Received(
|
|
137
|
+
address,
|
|
138
|
+
address,
|
|
139
|
+
uint256 tokenId,
|
|
140
|
+
bytes calldata
|
|
141
|
+
) external view ensureValidTokenId(tokenId) returns (bytes4) {
|
|
142
|
+
return _ERC721_RECEIVED;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function onNFTHarvest(
|
|
146
|
+
address,
|
|
147
|
+
address,
|
|
148
|
+
uint256 tokenId,
|
|
149
|
+
uint256,
|
|
150
|
+
uint256
|
|
151
|
+
) external view ensureValidTokenId(tokenId) returns (bool) {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function onNFTAddToPosition(
|
|
156
|
+
address,
|
|
157
|
+
uint256 tokenId,
|
|
158
|
+
uint256
|
|
159
|
+
) external view ensureValidTokenId(tokenId) returns (bool) {
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function onNFTWithdraw(
|
|
164
|
+
address,
|
|
165
|
+
uint256 tokenId,
|
|
166
|
+
uint256
|
|
167
|
+
) external view ensureValidTokenId(tokenId) returns (bool) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
}
|