@pendle/core-v2 2.17.5-tradingbot → 2.17.6-tradingbot
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/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- 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 +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- 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/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.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/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.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/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/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.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/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- 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/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
- 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/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/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +976 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBinanceEth.sol/PendleBinanceEth.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBinanceEth.sol/PendleBinanceEth.json +979 -0
- 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/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- 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/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
- 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/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +2 -151
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.json +42 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.json +82 -6
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.json +22 -22
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.json +42 -4
- 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/IPRouterStatic.sol/IPRouterStatic.json +146 -32
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.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/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.json +97 -0
- 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 +84 -8
- 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 +24 -24
- 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 +44 -6
- 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/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- 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/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.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/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/CallbackHelper.sol/CallbackHelper.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/core/TradingBot/BotActionCallback.sol +1 -1
- package/contracts/core/TradingBot/BotDecisionHelper.sol +306 -0
- package/contracts/core/TradingBot/BotSimulationLib.sol +8 -7
- package/contracts/core/TradingBot/LongYieldTradingBot.sol +20 -24
- package/contracts/core/TradingBot/MarketExtLib.sol +64 -31
- package/contracts/core/TradingBot/README.md +27 -25
- package/contracts/core/TradingBot/TradingBotBase.sol +36 -16
- package/contracts/interfaces/TradingBot/IBotDecisionHelper.sol +91 -0
- package/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol +7 -32
- package/contracts/interfaces/TradingBot/ITradingBotBase.sol +6 -4
- package/package.json +1 -1
- package/typechain-types/ActionMarketAuxStatic.ts +191 -38
- package/typechain-types/ActionMarketCoreStatic.ts +600 -134
- package/typechain-types/ActionMintRedeemStatic.ts +92 -26
- package/typechain-types/IPActionMarketAuxStatic.ts +191 -38
- package/typechain-types/IPActionMarketCoreStatic.ts +600 -134
- package/typechain-types/IPActionMintRedeemStatic.ts +92 -26
- package/typechain-types/IPRouterStatic.ts +888 -197
- package/typechain-types/IWBETH.ts +128 -0
- package/typechain-types/PendleBinanceEth.ts +1229 -0
- package/typechain-types/PtAndLpToAsset.ts +136 -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 +83 -7
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +23 -23
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +43 -5
- 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/BulkSellerFactory__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/Errors__factory.ts +1 -150
- package/typechain-types/factories/IPActionMarketAuxStatic__factory.ts +82 -6
- package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +22 -22
- package/typechain-types/factories/IPActionMintRedeemStatic__factory.ts +42 -4
- package/typechain-types/factories/IPRouterStatic__factory.ts +146 -32
- package/typechain-types/factories/IWBETH__factory.ts +51 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
- 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/PendleBinanceEth__factory.ts +1052 -0
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__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/PendleLpGlpOracle__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/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__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/PendleQiTokenHelper__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 +1 -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/PtAndLpToAsset__factory.ts +150 -0
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +36 -81
- package/typechain-types/index.ts +8 -18
- package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.json +0 -638
- package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.json +0 -638
- package/build/artifacts/contracts/core/TradingBot/BotDecisionLib.sol/BotDecisionLib.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/BotDecisionLib.sol/BotDecisionLib.json +0 -589
- package/build/artifacts/contracts/core/TradingBot/BotSimulationLib.sol/BotSimulationLib.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/BotSimulationLib.sol/BotSimulationLib.json +0 -10
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.json +0 -1887
- package/build/artifacts/contracts/core/TradingBot/MarketExtLib.sol/MarketExtLib.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/MarketExtLib.sol/MarketExtLib.json +0 -24
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.json +0 -588
- package/build/artifacts/contracts/core/TradingBot/TradingBotOffchain.sol/TradingBotOffchain.dbg.json +0 -4
- package/build/artifacts/contracts/core/TradingBot/TradingBotOffchain.sol/TradingBotOffchain.json +0 -1075
- package/build/artifacts/contracts/core/libraries/TokenAmountLib.sol/TokenAmountLib.dbg.json +0 -4
- package/build/artifacts/contracts/core/libraries/TokenAmountLib.sol/TokenAmountLib.json +0 -10
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.json +0 -889
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.json +0 -390
- package/contracts/core/TradingBot/BotDecisionLib.sol +0 -274
- package/contracts/core/TradingBot/TradingBotOffchain.sol +0 -141
|
@@ -1025,8 +1025,8 @@
|
|
|
1025
1025
|
"type": "receive"
|
|
1026
1026
|
}
|
|
1027
1027
|
],
|
|
1028
|
-
"bytecode": "0x60c06040523480156200001157600080fd5b50604051620024c0380380620024c08339810160408190526200003491620002e8565b6001600160a01b0382166080526200004e81600162000073565b6001600160a01b031660a08190526080516200006b9190620000e9565b5050620003eb565b604051634a83e9cd60e11b8152600481018290526000906001600160a01b03841690639507d39a90602401602060405180830381865afa158015620000bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e2919062000327565b9392505050565b6001600160a01b038216620000fc575050565b6200011060026001600160601b0362000347565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156200016a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019091906200037c565b1015620001b457620001a582826000620001b8565b620001b48282600019620001b8565b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169162000216919062000396565b6000604051808303816000865af19150503d806000811462000255576040519150601f19603f3d011682016040523d82523d6000602084013e6200025a565b606091505b50915091508180156200028857508051158062000288575080806020019051810190620002889190620003c7565b620002c85760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b604482015260640160405180910390fd5b5050505050565b6001600160a01b0381168114620002e557600080fd5b50565b60008060408385031215620002fc57600080fd5b82516200030981620002cf565b60208401519092506200031c81620002cf565b809150509250929050565b6000602082840312156200033a57600080fd5b8151620000e281620002cf565b60006001600160601b03838116806200037057634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6000602082840312156200038f57600080fd5b5051919050565b6000825160005b81811015620003b957602081860181015185830152016200039d565b506000920191825250919050565b600060208284031215620003da57600080fd5b81518015158114620000e257600080fd5b60805160a051612040620004806000396000818161012201528181610260015281816102b70152818161085e01526108860152600081816098015281816102f701528181610479015281816104a70152818161068f015281816108b1015281816108df01528181610bb001528181610bde01528181610d1601528181610d4401528181610ef90152610f2701526120406000f3fe60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a264697066735822122038ee458d49039630bcf2af10c7b635e14b6fc0f15e5f629cbf0a3ed16945ed0864736f6c63430008110033",
|
|
1029
|
-
"deployedBytecode": "0x60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a264697066735822122038ee458d49039630bcf2af10c7b635e14b6fc0f15e5f629cbf0a3ed16945ed0864736f6c63430008110033",
|
|
1028
|
+
"bytecode": "0x60c06040523480156200001157600080fd5b50604051620024c0380380620024c08339810160408190526200003491620002e8565b6001600160a01b0382166080526200004e81600162000073565b6001600160a01b031660a08190526080516200006b9190620000e9565b5050620003eb565b604051634a83e9cd60e11b8152600481018290526000906001600160a01b03841690639507d39a90602401602060405180830381865afa158015620000bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e2919062000327565b9392505050565b6001600160a01b038216620000fc575050565b6200011060026001600160601b0362000347565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156200016a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019091906200037c565b1015620001b457620001a582826000620001b8565b620001b48282600019620001b8565b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169162000216919062000396565b6000604051808303816000865af19150503d806000811462000255576040519150601f19603f3d011682016040523d82523d6000602084013e6200025a565b606091505b50915091508180156200028857508051158062000288575080806020019051810190620002889190620003c7565b620002c85760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b604482015260640160405180910390fd5b5050505050565b6001600160a01b0381168114620002e557600080fd5b50565b60008060408385031215620002fc57600080fd5b82516200030981620002cf565b60208401519092506200031c81620002cf565b809150509250929050565b6000602082840312156200033a57600080fd5b8151620000e281620002cf565b60006001600160601b03838116806200037057634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6000602082840312156200038f57600080fd5b5051919050565b6000825160005b81811015620003b957602081860181015185830152016200039d565b506000920191825250919050565b600060208284031215620003da57600080fd5b81518015158114620000e257600080fd5b60805160a051612040620004806000396000818161012201528181610260015281816102b70152818161085e01526108860152600081816098015281816102f701528181610479015281816104a70152818161068f015281816108b1015281816108df01528181610bb001528181610bde01528181610d1601528181610d4401528181610ef90152610f2701526120406000f3fe60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a2646970667358221220635fd5ac4da8293ad0f67d4277ce9e6770e982eeac264ffa09c556603e38d92a64736f6c63430008110033",
|
|
1029
|
+
"deployedBytecode": "0x60806040526004361061007a5760003560e01c806332fe7b261461008657806365debe5f146100d0578063ad5c464814610110578063af0b533114610144578063b558229a1461016c578063b8a3339c1461018c578063c7f36371146101ac578063d64bccb3146101cc578063dcdcc4c2146101ec57600080fd5b3661008157005b600080fd5b34801561009257600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100c79190611683565b60405180910390f35b3480156100dc57600080fd5b506100f06100eb3660046116af565b61020c565b6040805194855260208501939093529183015260608201526080016100c7565b34801561011c57600080fd5b506100ba7f000000000000000000000000000000000000000000000000000000000000000081565b610157610152366004611715565b610253565b604080519283526020830191909152016100c7565b34801561017857600080fd5b506100f06101873660046117a3565b6103c5565b34801561019857600080fd5b506100f06101a73660046117e5565b6103f1565b3480156101b857600080fd5b506100f06101c7366004611840565b61042a565b3480156101d857600080fd5b506101576101e736600461186c565b610448565b3480156101f857600080fd5b50610157610207366004611888565b610662565b60008060008061021b86610662565b90925090506102458561023160608901896118bc565b61023f9060208101906118dc565b8461084b565b909790965091945092509050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661028d60208501856118dc565b6001600160a01b0316146102a057600080fd5b6102b060003385602001356109fd565b6102e060007f00000000000000000000000000000000000000000000000000000000000000008560200135610a6e565b604051636fde40a760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dfbc814e90610334908a908a908a908a908a90600401611aa6565b60408051808303816000875af1158015610352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103769190611ae0565b60405191935091506000906001600160a01b038816903390600080516020611feb833981519152906103b390839060208a01359089908990611b04565b60405180910390a49550959350505050565b6000806000806103d486610448565b90935091506103e38584610b34565b909793965091945090925050565b60008060008061040086610662565b90935091506103e38561041660608901896118bc565b6104249060208101906118dc565b85610cfb565b60008060008061043986610448565b90925090506102458583610e7d565b60008061046761045b60208501856118dc565b33308660200135611046565b61049d61047760208501856118dc565b7f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663178d29d3306104da60208701876118dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152602086013560448201526000606482015260840160408051808303816000875af1158015610537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055b9190611ae0565b90925090506105706060840160408501611b2a565b156105f65761058260208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016105ad9190611683565b6000604051808303816000875af11580156105cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f49190810190611b8d565b505b3361060460208501856118dc565b6001600160a01b0316336001600160a01b03167fd31f02c44717b409d13b92ec9d2eaf1427fb4e63f85f4777f1458fb8d9387761866020013586604051610655929190918252602082015260400190565b60405180910390a4915091565b60008061067561045b60208501856118dc565b61068561047760208501856118dc565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663690807ad306106c260208701876118dc565b60208701356106d460608901896118bc565b6040518563ffffffff1660e01b81526004016106f39493929190611c32565b60408051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190611ae0565b909250905061074a6060840160408501611b2a565b156107d05761075c60208401846118dc565b6001600160a01b0316639262187b336040518263ffffffff1660e01b81526004016107879190611683565b6000604051808303816000875af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce9190810190611b8d565b505b6107dd60608401846118bc565b6107eb9060208101906118dc565b6001600160a01b031661080160208501856118dc565b6001600160a01b0316336001600160a01b03167f3fff08e8137afe866dce7ced13ddc12d684db61b80b0ac5cb9e54961c9dd8a213387602001358760405161065593929190611c6f565b6000806001600160a01b0384166108ab577f000000000000000000000000000000000000000000000000000000000000000093506108ab60007f000000000000000000000000000000000000000000000000000000000000000085610a6e565b6108d5847f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663dfbc814e3361091260208901896118dc565b886020013589604001356109398a8a8d606001602081019061093491906118dc565b61112b565b6040518663ffffffff1660e01b8152600401610959959493929190611d7a565b60408051808303816000875af1158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ae0565b90925090506001600160a01b0384166109b760208701876118dc565b6001600160a01b0316336001600160a01b0316600080516020611feb833981519152338787876040516109ed9493929190611b04565b60405180910390a4935093915050565b6001600160a01b038316610a5357803414610a4e5760405162461bcd60e51b815260206004820152600c60248201526b0cae8d040dad2e6dac2e8c6d60a31b60448201526064015b60405180910390fd5b505050565b8015610a4e57610a4e6001600160a01b0384168330846111a8565b6001600160a01b038316610ad557816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b5050505050505050565b604051632e1a7d4d60e01b8152600481018290526001600160a01b03841690632e1a7d4d90602401600060405180830381600087803b158015610b1757600080fd5b505af1158015610b2b573d6000803e3d6000fd5b50505050505050565b60008080610b4560208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba69190611db4565b50509050610bd4817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663409c7a8933610c1160208901896118dc565b878960200135610c298b6060018c604001358c611202565b6040518663ffffffff1660e01b8152600401610c49959493929190611e31565b60408051808303816000875af1158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190611ae0565b909350915033610c9e60208701876118dc565b6001600160a01b0316336001600160a01b03167fb51950711c9b21dc7888d41f68a19540231ffb5f0d19d8f75cbccaf90ffa7fa58787604051610ceb929190918252602082015260400190565b60405180910390a4509250929050565b600080806001600160a01b038516610d105750825b610d3a857f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663015491d18233610d7860208b018b6118dc565b8a60200135610d8f8c6060018d604001358c611202565b610da88c8c8f61010001602081019061093491906118dc565b6040518763ffffffff1660e01b8152600401610dc8959493929190611e65565b604080518083038185885af1158015610de5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0a9190611ae0565b90935091506001600160a01b038516610e2660208801886118dc565b6001600160a01b0316336001600160a01b03167ff83776e5b667a2b471f92ddfd482749c61b5328b832d375097638c2c08818f3b338888604051610e6c93929190611c6f565b60405180910390a450935093915050565b60008080610e8e60208601866118dc565b6001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef9190611db4565b50509050610f1d817f0000000000000000000000000000000000000000000000000000000000000000611067565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663844384aa33610f5a60208901896118dc565b604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820188905260208901356064830152880135608482015260a40160408051808303816000875af1158015610fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe69190611ae0565b909350915033610ff960208701876118dc565b60408051878152602081018790529081018590526001600160a01b03919091169033907fc8437d84f52d1e20cc82487e336feadb2d39ede00af7711b6a58abf39392328f90606001610ceb565b8015611061576110616001600160a01b0385168484846111a8565b50505050565b6001600160a01b038216611079575050565b61108b60026001600160601b03611ebb565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ee1565b10156111275761111a82826000611326565b6111278282600019611326565b5050565b61117e6040805160c081018252600080825260208083018290528284018290526060808401839052608080850184905285519081018652838152918201839052938101849052928301529060a082015290565b6001600160a01b0380851660408301819052825260208201849052821660608201525b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611061908590611430565b6112346040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b83604001356000036112a657833515801561125457506000198460200135145b6112905760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420677565737360981b6044820152606401610a45565b61129f36859003850185611efa565b90506111a1565b6040805160a0810190915280846112be858835611f69565b6112c89190611f94565b8152602001848487602001356112de9190611f69565b6112e89190611f94565b8152602001846112fc856040890135611f69565b6113069190611f94565b815260200185606001358152602001856080013581525090509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916113829190611fa8565b6000604051808303816000865af19150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113ee5750805115806113ee5750808060200190518101906113ee9190611fba565b6114295760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b6044820152606401610a45565b5050505050565b6000611485826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115029092919063ffffffff16565b805190915015610a4e57808060200190518101906114a39190611fba565b610a4e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a45565b60606115118484600085611519565b949350505050565b60608247101561157a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a45565b6001600160a01b0385163b6115d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b600080866001600160a01b031685876040516115ed9190611fa8565b60006040518083038185875af1925050503d806000811461162a576040519150601f19603f3d011682016040523d82523d6000602084013e61162f565b606091505b509150915061163f82828661164a565b979650505050505050565b606083156116595750816111a1565b8251156116695782518084602001fd5b8160405162461bcd60e51b8152600401610a459190611fd7565b6001600160a01b0391909116815260200190565b6000608082840312156116a957600080fd5b50919050565b60008060a083850312156116c257600080fd5b82356001600160401b038111156116d857600080fd5b6116e485828601611697565b9250506116f48460208501611697565b90509250929050565b6001600160a01b038116811461171257600080fd5b50565b600080600080600060a0868803121561172d57600080fd5b8535611738816116fd565b94506020860135611748816116fd565b9350604086013592506060860135915060808601356001600160401b0381111561177157600080fd5b860160c0818903121561178357600080fd5b809150509295509295909350565b6000606082840312156116a957600080fd5b6000808284036101608112156117b857600080fd5b6117c28585611791565b9250610100605f19820112156117d757600080fd5b506060830190509250929050565b6000808284036101408112156117fa57600080fd5b83356001600160401b0381111561181057600080fd5b61181c86828701611697565b935050610120601f198201121561183257600080fd5b506020830190509250929050565b60008060c0838503121561185357600080fd5b61185d8484611791565b91506116f48460608501611791565b60006060828403121561187e57600080fd5b6111a18383611791565b60006020828403121561189a57600080fd5b81356001600160401b038111156118b057600080fd5b61151184828501611697565b6000823560be198336030181126118d257600080fd5b9190910192915050565b6000602082840312156118ee57600080fd5b81356111a1816116fd565b6004811061191757634e487b7160e01b600052602160045260246000fd5b9052565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b801515811461171257600080fd5b803561195d81611944565b919050565b600081356004811061197357600080fd5b61197d84826118f9565b50602082013561198c816116fd565b6001600160a01b03166020840152604082013536839003601e190181126119b257600080fd5b82016020810190356001600160401b038111156119ce57600080fd5b8036038213156119dd57600080fd5b608060408601526119f260808601828461191b565b915050611a0160608401611952565b8015156060860152509392505050565b60008135611a1e816116fd565b6001600160a01b03908116845260208381013590850152604083013590611a44826116fd565b9081166040850152606083013590611a5b826116fd565b9081166060850152608083013590611a72826116fd565b16608084015260a082013536839003607e19018112611a9057600080fd5b60c060a085015261151160c08501848301611962565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611a11565b60008060408385031215611af357600080fd5b505080516020909101519092909150565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208284031215611b3c57600080fd5b81356111a181611944565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611b8557611b85611b47565b604052919050565b60006020808385031215611ba057600080fd5b82516001600160401b0380821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b815181811115611bdd57611bdd611b47565b8060051b9150611bee848301611b5d565b8181529183018401918481019088841115611c0857600080fd5b938501935b83851015611c2657845182529385019390850190611c0d565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611c6590830184611a11565b9695505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60005b83811015611cab578181015183820152602001611c93565b50506000910152565b60008151808452611ccc816020860160208601611c90565b601f01601f19169290920160200192915050565b600060018060a01b038083511684526020830151602085015280604084015116604085015280606084015116606085015280608084015116608085015260a083015160c060a0860152611d3760c0860182516118f9565b8160208201511660e0860152604081015191506080610100860152611d60610140860183611cb4565b915060608101511515610120860152508091505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061163f90830184611ce0565b600080600060608486031215611dc957600080fd5b8351611dd4816116fd565b6020850151909350611de5816116fd565b6040850151909250611df6816116fd565b809150509250925092565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b6001600160a01b0386811682528516602082015260408101849052606081018390526101208101611c656080830184611e01565b6001600160a01b03868116825285166020820152604081018490526000610120611e926060840186611e01565b80610100840152611c2681840185611ce0565b634e487b7160e01b600052601260045260246000fd5b60006001600160601b0383811680611ed557611ed5611ea5565b92169190910492915050565b600060208284031215611ef357600080fd5b5051919050565b600060a08284031215611f0c57600080fd5b60405160a081016001600160401b0381118282101715611f2e57611f2e611b47565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b8082028115828204841417611f8e57634e487b7160e01b600052601160045260246000fd5b92915050565b600082611fa357611fa3611ea5565b500490565b600082516118d2818460208701611c90565b600060208284031215611fcc57600080fd5b81516111a181611944565b6020815260006111a16020830184611cb456fe43eb84d5f21c53e2b7be07b8fc06cbbb55af094a111c91c7ddc6513fed4d0352a2646970667358221220635fd5ac4da8293ad0f67d4277ce9e6770e982eeac264ffa09c556603e38d92a64736f6c63430008110033",
|
|
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": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d9c9f3307a2b93694a607478da8e1c814560f2a142958505f9ef0375f01a781764736f6c63430008110033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d9c9f3307a2b93694a607478da8e1c814560f2a142958505f9ef0375f01a781764736f6c63430008110033",
|
|
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": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ee432d301e62898c967b50ec81328ef080a36afe72d1d4ab57afefe9a9a23ca364736f6c63430008110033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ee432d301e62898c967b50ec81328ef080a36afe72d1d4ab57afefe9a9a23ca364736f6c63430008110033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import "./BotSimulationLib.sol";
|
|
5
|
+
import "../libraries/Errors.sol";
|
|
6
|
+
import "../../interfaces/TradingBot/IBotDecisionHelper.sol";
|
|
7
|
+
|
|
8
|
+
contract BotDecisionHelper is IBotDecisionHelper {
|
|
9
|
+
using MarketExtLib for MarketExtState;
|
|
10
|
+
using MarketExtLib for ApproxParams;
|
|
11
|
+
using MarketMathCore for MarketState;
|
|
12
|
+
using MarketApproxPtInLib for MarketState;
|
|
13
|
+
using BotSimulationLib for BotState;
|
|
14
|
+
using PYIndexLib for PYIndex;
|
|
15
|
+
using Math for uint256;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Binary search for the smallest parameter `botParam` for the corresponding rebalancing action
|
|
19
|
+
* such that the bot reaches desired target, otherwise give the largest `botParam` possible
|
|
20
|
+
* that action doesn't revert.
|
|
21
|
+
*
|
|
22
|
+
* @param action Action to take, from which target is derived
|
|
23
|
+
* @param botParams ApproxParams for `botParam`
|
|
24
|
+
* @param intParams ApproxParams for internal action's approximation (e.g. for router's swap)
|
|
25
|
+
*
|
|
26
|
+
* For `botParams`, eps = the precision such that slightly lower
|
|
27
|
+
* (param = (return value) * (1 - eps)) does not reach target
|
|
28
|
+
*
|
|
29
|
+
* - Returns `botParams.guessOffchain` if it reaches target, and slightly lower does not
|
|
30
|
+
* - Reverts if `botParams.guessMin` is invalid, or returns `botParams.guessMin` if reaches
|
|
31
|
+
* target
|
|
32
|
+
* - Returns `botParams.guessMax` if it is valid & does not reach target
|
|
33
|
+
* - Otherwise, binary search for `guess` such that it reaches target, and slightly lower does
|
|
34
|
+
* not
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
function searchForBotParam(
|
|
38
|
+
BotState memory bot,
|
|
39
|
+
MarketExtState memory marketExt,
|
|
40
|
+
LongTradingSpecs memory specs,
|
|
41
|
+
ActionType action,
|
|
42
|
+
ApproxParams memory botParams,
|
|
43
|
+
ApproxParams memory intParams
|
|
44
|
+
) public pure returns (uint256, RebalanceResult) {
|
|
45
|
+
RebalanceDetails memory rebalance = RebalanceDetails(bot, marketExt, specs, action);
|
|
46
|
+
|
|
47
|
+
if (botParams.guessOffchain != 0) {
|
|
48
|
+
uint256 guessOffchainMinusDelta = botParams.guessOffchain.mulDown(
|
|
49
|
+
Math.ONE - botParams.eps
|
|
50
|
+
);
|
|
51
|
+
if (
|
|
52
|
+
_rebalanceResult(rebalance, botParams.guessOffchain, intParams) ==
|
|
53
|
+
RebalanceResult.TARGET_REACHED &&
|
|
54
|
+
_rebalanceResult(rebalance, guessOffchainMinusDelta, intParams) ==
|
|
55
|
+
RebalanceResult.TARGET_NOT_REACHED
|
|
56
|
+
) return (botParams.guessOffchain, RebalanceResult.TARGET_REACHED);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
{
|
|
60
|
+
uint256 guessUpperBound = _weakUpperBound(bot, marketExt, action);
|
|
61
|
+
if (botParams.guessMax > guessUpperBound) botParams.guessMax = guessUpperBound;
|
|
62
|
+
if (botParams.guessMin > botParams.guessMax)
|
|
63
|
+
revert Errors.BotBinarySearchInvalidRange(
|
|
64
|
+
uint256(action),
|
|
65
|
+
botParams.guessMin,
|
|
66
|
+
botParams.guessMax
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
if (
|
|
70
|
+
_rebalanceResult(rebalance, botParams.guessMax, intParams) ==
|
|
71
|
+
RebalanceResult.TARGET_NOT_REACHED
|
|
72
|
+
) return (botParams.guessMax, RebalanceResult.TARGET_NOT_REACHED);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
{
|
|
76
|
+
RebalanceResult guessMinResult = _rebalanceResult(
|
|
77
|
+
rebalance,
|
|
78
|
+
botParams.guessMin,
|
|
79
|
+
intParams
|
|
80
|
+
);
|
|
81
|
+
if (guessMinResult == RebalanceResult.FAIL)
|
|
82
|
+
revert Errors.BotBinarySearchGuessMinInvalid(uint256(action), botParams.guessMin);
|
|
83
|
+
if (guessMinResult == RebalanceResult.TARGET_REACHED)
|
|
84
|
+
return (botParams.guessMin, RebalanceResult.TARGET_REACHED);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
for (uint256 iter = 0; iter < botParams.maxIteration; ++iter) {
|
|
88
|
+
uint256 guess = botParams.guessMin + (botParams.guessMax - botParams.guessMin) / 2;
|
|
89
|
+
|
|
90
|
+
if (
|
|
91
|
+
_rebalanceResult(rebalance, guess, intParams) == RebalanceResult.TARGET_NOT_REACHED
|
|
92
|
+
) {
|
|
93
|
+
botParams.guessMin = guess;
|
|
94
|
+
} else {
|
|
95
|
+
botParams.guessMax = guess;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (Math.isASmallerApproxB(botParams.guessMin, botParams.guessMax, botParams.eps)) {
|
|
99
|
+
if (
|
|
100
|
+
_rebalanceResult(rebalance, botParams.guessMin, intParams) ==
|
|
101
|
+
RebalanceResult.FAIL
|
|
102
|
+
)
|
|
103
|
+
return (
|
|
104
|
+
botParams.guessMin,
|
|
105
|
+
_rebalanceResult(rebalance, botParams.guessMin, intParams)
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
botParams.guessMax,
|
|
110
|
+
_rebalanceResult(rebalance, botParams.guessMax, intParams)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
revert Errors.BotBinarySearchFail();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Given the rebalancing action and its `botParam`, binary search for the optimal internal
|
|
120
|
+
* parameter `intParam` for the internal action's approximation (e.g. for router's swap)
|
|
121
|
+
*/
|
|
122
|
+
function searchForIntParam(
|
|
123
|
+
MarketExtState memory marketExt,
|
|
124
|
+
ActionType action,
|
|
125
|
+
uint256 botParam,
|
|
126
|
+
ApproxParams memory intParams
|
|
127
|
+
) public pure returns (uint256) {
|
|
128
|
+
if (action == ActionType.RemoveLiqToYt) {
|
|
129
|
+
(, uint256 totalPtToSwap) = marketExt.clone().removeLiqToYt(botParam, intParams);
|
|
130
|
+
return totalPtToSwap;
|
|
131
|
+
} else {
|
|
132
|
+
return 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function strategyState(
|
|
137
|
+
BotState memory bot,
|
|
138
|
+
MarketExtState memory marketExt,
|
|
139
|
+
LongTradingSpecs memory specs
|
|
140
|
+
) public pure returns (StrategyState memory currentState) {
|
|
141
|
+
(, uint256 iy, uint256 currentSyRatio, uint256 currentYtPtRatio) = botExtStats(
|
|
142
|
+
bot,
|
|
143
|
+
marketExt
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
if (iy < specs.lowerIyLimit) {
|
|
147
|
+
currentState.iyFlag = StrategyFlag.TOO_LOW;
|
|
148
|
+
} else if (specs.upperIyLimit < iy && currentYtPtRatio > specs.ytPtRatioLimit) {
|
|
149
|
+
currentState.iyFlag = StrategyFlag.TOO_HIGH;
|
|
150
|
+
} else {
|
|
151
|
+
currentState.iyFlag = StrategyFlag.GOOD;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (currentSyRatio > specs.floatingSyRatioLimit) {
|
|
155
|
+
currentState.syRatioFlag = StrategyFlag.TOO_HIGH;
|
|
156
|
+
} else {
|
|
157
|
+
currentState.syRatioFlag = StrategyFlag.GOOD;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function actionToTake(
|
|
162
|
+
BotState memory botState,
|
|
163
|
+
StrategyState memory currentState
|
|
164
|
+
) public pure returns (ActionType) {
|
|
165
|
+
if (currentState.iyFlag == StrategyFlag.TOO_LOW) {
|
|
166
|
+
if (currentState.syRatioFlag == StrategyFlag.TOO_HIGH) {
|
|
167
|
+
if (botState.syBalance == 0) return ActionType.NONE;
|
|
168
|
+
return ActionType.SwapSyToYt;
|
|
169
|
+
} else {
|
|
170
|
+
if (botState.lpBalance == 0) return ActionType.NONE;
|
|
171
|
+
return ActionType.RemoveLiqToYt;
|
|
172
|
+
}
|
|
173
|
+
} else if (currentState.iyFlag == StrategyFlag.GOOD) {
|
|
174
|
+
if (currentState.syRatioFlag == StrategyFlag.TOO_HIGH) {
|
|
175
|
+
if (botState.syBalance == 0) return ActionType.NONE;
|
|
176
|
+
return ActionType.AddLiqKeepYt;
|
|
177
|
+
} else {
|
|
178
|
+
return ActionType.NONE;
|
|
179
|
+
}
|
|
180
|
+
} else {
|
|
181
|
+
if (currentState.syRatioFlag == StrategyFlag.TOO_HIGH) {
|
|
182
|
+
if (botState.syBalance == 0) return ActionType.NONE;
|
|
183
|
+
return ActionType.AddLiqFromSy;
|
|
184
|
+
} else {
|
|
185
|
+
if (botState.ytBalance == 0) return ActionType.NONE;
|
|
186
|
+
return ActionType.AddLiqFromYt;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/// @dev Does not modify params, structs are cloned before simulation
|
|
192
|
+
function previewAction(
|
|
193
|
+
BotState memory botData,
|
|
194
|
+
MarketExtState memory marketExtData,
|
|
195
|
+
ActionType action,
|
|
196
|
+
uint256 botParam,
|
|
197
|
+
ApproxParams memory swapApproxParams
|
|
198
|
+
) public pure returns (bool success, BotState memory bot, MarketExtState memory marketExt) {
|
|
199
|
+
bot = botData.clone();
|
|
200
|
+
marketExt = marketExtData.clone();
|
|
201
|
+
|
|
202
|
+
if (action == ActionType.SwapSyToYt) {
|
|
203
|
+
success = bot.swapSyToYt(marketExt, botParam);
|
|
204
|
+
} else if (action == ActionType.AddLiqKeepYt) {
|
|
205
|
+
success = bot.addLiqKeepYt(marketExt, botParam);
|
|
206
|
+
} else if (action == ActionType.AddLiqFromSy) {
|
|
207
|
+
success = bot.addLiqFromSy(marketExt, botParam);
|
|
208
|
+
} else if (action == ActionType.AddLiqFromYt) {
|
|
209
|
+
success = bot.addLiqFromYt(marketExt, botParam);
|
|
210
|
+
} else if (action == ActionType.RemoveLiqToYt) {
|
|
211
|
+
success = bot.removeLiqToYt(marketExt, botParam, swapApproxParams);
|
|
212
|
+
} else {
|
|
213
|
+
success = false;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function botExtStats(
|
|
218
|
+
BotState memory bot,
|
|
219
|
+
MarketExtState memory marketExt
|
|
220
|
+
)
|
|
221
|
+
public
|
|
222
|
+
pure
|
|
223
|
+
returns (uint256 tvlInSy, uint256 iy, uint256 currentSyRatio, uint256 currentYtPtRatio)
|
|
224
|
+
{
|
|
225
|
+
tvlInSy = bot.tvlInSy(marketExt);
|
|
226
|
+
|
|
227
|
+
iy = marketExt.impliedYield();
|
|
228
|
+
|
|
229
|
+
currentSyRatio = bot.syBalance.divDown(tvlInSy);
|
|
230
|
+
|
|
231
|
+
(, uint256 ptInLp) = marketExt.clone().removeLiqDual(bot.lpBalance);
|
|
232
|
+
currentYtPtRatio = (ptInLp == 0 ? type(uint256).max : bot.ytBalance.divDown(ptInLp));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/// @dev Gives a weak upper bound so that MarketExtLib's simulation doesn't revert
|
|
236
|
+
function _weakUpperBound(
|
|
237
|
+
BotState memory bot,
|
|
238
|
+
MarketExtState memory marketExt,
|
|
239
|
+
ActionType action
|
|
240
|
+
) private pure returns (uint256) {
|
|
241
|
+
if (action == ActionType.SwapSyToYt) {
|
|
242
|
+
return marketExt.calcMaxPtIn();
|
|
243
|
+
} else if (action == ActionType.AddLiqKeepYt) {
|
|
244
|
+
return bot.syBalance;
|
|
245
|
+
} else if (action == ActionType.AddLiqFromSy) {
|
|
246
|
+
return marketExt.calcMaxPtOut();
|
|
247
|
+
} else if (action == ActionType.AddLiqFromYt) {
|
|
248
|
+
return marketExt.calcMaxPtOut();
|
|
249
|
+
} else if (action == ActionType.RemoveLiqToYt) {
|
|
250
|
+
return bot.lpBalance;
|
|
251
|
+
} else {
|
|
252
|
+
return 0;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function _rebalanceResult(
|
|
257
|
+
RebalanceDetails memory rebalance,
|
|
258
|
+
uint256 botParam,
|
|
259
|
+
ApproxParams memory intParams
|
|
260
|
+
) private pure returns (RebalanceResult) {
|
|
261
|
+
(bool success, BotState memory bot, MarketExtState memory marketExt) = previewAction(
|
|
262
|
+
rebalance.bot,
|
|
263
|
+
rebalance.marketExt,
|
|
264
|
+
rebalance.action,
|
|
265
|
+
botParam,
|
|
266
|
+
intParams
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
if (!success) return RebalanceResult.FAIL;
|
|
270
|
+
if (_reachedTarget(bot, marketExt, rebalance.specs, rebalance.action)) {
|
|
271
|
+
return RebalanceResult.TARGET_REACHED;
|
|
272
|
+
}
|
|
273
|
+
return RebalanceResult.TARGET_NOT_REACHED;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function _reachedTarget(
|
|
277
|
+
BotState memory bot,
|
|
278
|
+
MarketExtState memory marketExt,
|
|
279
|
+
LongTradingSpecs memory specs,
|
|
280
|
+
ActionType action
|
|
281
|
+
) private pure returns (bool) {
|
|
282
|
+
uint256 targetIy = (specs.lowerIyLimit + specs.upperIyLimit) / 2;
|
|
283
|
+
|
|
284
|
+
(, uint256 iy, uint256 currentSyRatio, uint256 currentYtPtRatio) = botExtStats(
|
|
285
|
+
bot,
|
|
286
|
+
marketExt
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
if (action == ActionType.SwapSyToYt) {
|
|
290
|
+
return iy >= targetIy || currentSyRatio <= specs.floatingSyRatioTarget;
|
|
291
|
+
} else if (action == ActionType.AddLiqKeepYt) {
|
|
292
|
+
return currentSyRatio <= specs.floatingSyRatioTarget;
|
|
293
|
+
} else if (action == ActionType.AddLiqFromSy) {
|
|
294
|
+
return
|
|
295
|
+
iy <= targetIy ||
|
|
296
|
+
currentSyRatio <= specs.floatingSyRatioTarget ||
|
|
297
|
+
currentYtPtRatio <= specs.ytPtRatioTarget;
|
|
298
|
+
} else if (action == ActionType.AddLiqFromYt) {
|
|
299
|
+
return iy <= targetIy || currentYtPtRatio <= specs.ytPtRatioTarget;
|
|
300
|
+
} else if (action == ActionType.RemoveLiqToYt) {
|
|
301
|
+
return iy >= targetIy;
|
|
302
|
+
} else {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
@@ -84,7 +84,7 @@ library BotSimulationLib {
|
|
|
84
84
|
) internal pure returns (bool /*success*/) {
|
|
85
85
|
if (netLpToRemove > bot.lpBalance) return false;
|
|
86
86
|
|
|
87
|
-
uint256 netYtOut = marketExt.removeLiqToYt(netLpToRemove, approxParams);
|
|
87
|
+
(uint256 netYtOut, ) = marketExt.removeLiqToYt(netLpToRemove, approxParams);
|
|
88
88
|
|
|
89
89
|
bot.lpBalance -= netLpToRemove;
|
|
90
90
|
bot.ytBalance += netYtOut;
|
|
@@ -92,19 +92,20 @@ library BotSimulationLib {
|
|
|
92
92
|
return true;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
/// @dev Only for estimation, does not reflect exact SY amount that would be redeemed
|
|
96
95
|
function tvlInSy(
|
|
97
96
|
BotState memory bot,
|
|
98
97
|
MarketExtState memory marketExt
|
|
99
98
|
) internal pure returns (uint256) {
|
|
100
|
-
|
|
99
|
+
MarketExtState memory marketExtClone = marketExt.clone();
|
|
100
|
+
|
|
101
|
+
(uint256 syInLp, uint256 ptInLp) = marketExtClone.removeLiqDual(bot.lpBalance);
|
|
101
102
|
uint256 totalValue = bot.syBalance + syInLp;
|
|
102
103
|
if (ptInLp <= bot.ytBalance) {
|
|
103
|
-
totalValue +=
|
|
104
|
-
totalValue +=
|
|
104
|
+
totalValue += marketExtClone.previewPyToSy(ptInLp);
|
|
105
|
+
totalValue += marketExtClone.swapYtToSy(bot.ytBalance - ptInLp);
|
|
105
106
|
} else {
|
|
106
|
-
totalValue +=
|
|
107
|
-
totalValue +=
|
|
107
|
+
totalValue += marketExtClone.previewPyToSy(bot.ytBalance);
|
|
108
|
+
totalValue += marketExtClone.swapPtToSy(ptInLp - bot.ytBalance);
|
|
108
109
|
}
|
|
109
110
|
return totalValue;
|
|
110
111
|
}
|