@pendle/core-v2 1.1.0-mainnet → 1.2.0-mainnet
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/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 +4 -0
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +560 -0
- 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/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/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/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/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/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/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/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.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 +86 -5
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.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/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +24 -32
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- 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/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/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.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/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.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/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.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/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.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/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/{IMultihopRouter.sol/IMultihopRouter.json → IMultihopRouterEthereum.sol/IMultihopRouterEthereum.json} +3 -3
- package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +224 -0
- package/contracts/core/BulkSeller/BulkSeller.sol +1 -1
- package/contracts/core/libraries/ArrayLib.sol +9 -0
- package/contracts/core/libraries/Errors.sol +10 -2
- package/contracts/interfaces/IPFeeDistributor.sol +12 -10
- package/contracts/offchain-helpers/Multicall2.sol +103 -0
- package/contracts/router/kyberswap/AggregationRouterHelper.sol +37 -23
- package/contracts/router/kyberswap/{IMultihopRouter.sol → IMultihopRouterEthereum.sol} +11 -9
- package/deployments/1-core.json +2 -1
- package/package.json +1 -1
- package/typechain-types/BribeDistributor.ts +363 -0
- package/typechain-types/DistributorBase.ts +363 -0
- package/typechain-types/FeeDistributor.ts +416 -0
- package/typechain-types/IMultihopRouterEthereum.ts +209 -0
- package/typechain-types/IPFeeDistributor.ts +43 -78
- package/typechain-types/IPFeeDistributorFactory.ts +53 -139
- package/typechain-types/PendleFeeDistributor.ts +373 -118
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionMisc__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTYT__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/AggregationRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/BribeDistributor__factory.ts +303 -0
- 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/DistributorBase__factory.ts +249 -0
- package/typechain-types/factories/Errors__factory.ts +85 -4
- package/typechain-types/factories/FeeDistributor__factory.ts +339 -0
- package/typechain-types/factories/IMultihopRouterEthereum__factory.ts +155 -0
- package/typechain-types/factories/IPFeeDistributorFactory__factory.ts +25 -34
- package/typechain-types/factories/IPFeeDistributor__factory.ts +24 -32
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__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/PendleFeeDistributor__factory.ts +310 -67
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__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/PendleRouter__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/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +1 -1
- 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 +18 -36
- package/typechain-types/index.ts +4 -8
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.json +0 -131
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -310
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +0 -389
- package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.json +0 -76
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouter.sol/IMultihopRouter.dbg.json +0 -4
- package/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol +0 -159
- package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol +0 -99
- package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol +0 -70
- package/contracts/interfaces/IPFeeDistributorFactory.sol +0 -14
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
pragma solidity >=0.5.0;
|
|
2
|
+
pragma experimental ABIEncoderV2;
|
|
3
|
+
|
|
4
|
+
/// @title Multicall2 - Aggregate results from multiple read-only function calls
|
|
5
|
+
/// @author Michael Elliot <mike@makerdao.com>
|
|
6
|
+
/// @author Joshua Levine <joshua@makerdao.com>
|
|
7
|
+
/// @author Nick Johnson <arachnid@notdot.net>
|
|
8
|
+
|
|
9
|
+
contract Multicall2 {
|
|
10
|
+
struct Call {
|
|
11
|
+
address target;
|
|
12
|
+
bytes callData;
|
|
13
|
+
}
|
|
14
|
+
struct Result {
|
|
15
|
+
bool success;
|
|
16
|
+
bytes returnData;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function aggregate(Call[] memory calls)
|
|
20
|
+
public
|
|
21
|
+
returns (uint256 blockNumber, bytes[] memory returnData)
|
|
22
|
+
{
|
|
23
|
+
blockNumber = block.number;
|
|
24
|
+
returnData = new bytes[](calls.length);
|
|
25
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
26
|
+
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
27
|
+
require(success, "Multicall aggregate: call failed");
|
|
28
|
+
returnData[i] = ret;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function blockAndAggregate(Call[] memory calls)
|
|
33
|
+
public
|
|
34
|
+
returns (
|
|
35
|
+
uint256 blockNumber,
|
|
36
|
+
bytes32 blockHash,
|
|
37
|
+
Result[] memory returnData
|
|
38
|
+
)
|
|
39
|
+
{
|
|
40
|
+
(blockNumber, blockHash, returnData) = tryBlockAndAggregate(true, calls);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {
|
|
44
|
+
blockHash = blockhash(blockNumber);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getBlockNumber() public view returns (uint256 blockNumber) {
|
|
48
|
+
blockNumber = block.number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function getCurrentBlockCoinbase() public view returns (address coinbase) {
|
|
52
|
+
coinbase = block.coinbase;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {
|
|
56
|
+
difficulty = block.difficulty;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
|
|
60
|
+
gaslimit = block.gaslimit;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
|
|
64
|
+
timestamp = block.timestamp;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getEthBalance(address addr) public view returns (uint256 balance) {
|
|
68
|
+
balance = addr.balance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getLastBlockHash() public view returns (bytes32 blockHash) {
|
|
72
|
+
blockHash = blockhash(block.number - 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function tryAggregate(bool requireSuccess, Call[] memory calls)
|
|
76
|
+
public
|
|
77
|
+
returns (Result[] memory returnData)
|
|
78
|
+
{
|
|
79
|
+
returnData = new Result[](calls.length);
|
|
80
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
81
|
+
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
82
|
+
|
|
83
|
+
if (requireSuccess) {
|
|
84
|
+
require(success, "Multicall2 aggregate: call failed");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
returnData[i] = Result(success, ret);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function tryBlockAndAggregate(bool requireSuccess, Call[] memory calls)
|
|
92
|
+
public
|
|
93
|
+
returns (
|
|
94
|
+
uint256 blockNumber,
|
|
95
|
+
bytes32 blockHash,
|
|
96
|
+
Result[] memory returnData
|
|
97
|
+
)
|
|
98
|
+
{
|
|
99
|
+
blockNumber = block.number;
|
|
100
|
+
blockHash = blockhash(block.number);
|
|
101
|
+
returnData = tryAggregate(requireSuccess, calls);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
2
|
|
|
3
3
|
pragma solidity 0.8.17;
|
|
4
4
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
-
import "./
|
|
5
|
+
import "./IMultihopRouterEthereum.sol";
|
|
6
6
|
import "./IAggregatorRouterHelper.sol";
|
|
7
7
|
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
8
8
|
import "../../core/libraries/BoringOwnableUpgradeable.sol";
|
|
@@ -40,8 +40,7 @@ contract AggregationRouterHelper is
|
|
|
40
40
|
BALANCERV2,
|
|
41
41
|
KYBERRFQ,
|
|
42
42
|
DODO,
|
|
43
|
-
|
|
44
|
-
PLATYPUS
|
|
43
|
+
WSTETH
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
struct SwapDescription {
|
|
@@ -65,7 +64,7 @@ contract AggregationRouterHelper is
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
struct SwapExecutorDescription {
|
|
68
|
-
|
|
67
|
+
IMultihopRouterEthereum.Swap[][] swapSequences;
|
|
69
68
|
address tokenIn;
|
|
70
69
|
address tokenOut;
|
|
71
70
|
uint256 minTotalAmountOut;
|
|
@@ -178,7 +177,7 @@ contract AggregationRouterHelper is
|
|
|
178
177
|
|
|
179
178
|
uint256 newTotalSwapAmount;
|
|
180
179
|
for (uint256 i = 0; i < swapExecutorDescription.swapSequences.length; i++) {
|
|
181
|
-
|
|
180
|
+
IMultihopRouterEthereum.Swap memory swap = swapExecutorDescription.swapSequences[i][0];
|
|
182
181
|
uint8 dexType = uint8(swap.dexOption >> 8);
|
|
183
182
|
uint256 value;
|
|
184
183
|
if (i == swapExecutorDescription.swapSequences.length - 1)
|
|
@@ -200,8 +199,8 @@ contract AggregationRouterHelper is
|
|
|
200
199
|
revert("kyber: can't scale kyberrfq");
|
|
201
200
|
} else if (dexType == uint8(DexType.DODO)) {
|
|
202
201
|
(swap.data, value) = _newDODOSwap(swap.data, value, oldAmount, newAmount);
|
|
203
|
-
} else if (dexType == uint8(DexType.
|
|
204
|
-
(swap.data, value) =
|
|
202
|
+
} else if (dexType == uint8(DexType.WSTETH)) {
|
|
203
|
+
(swap.data, value) = _newWrappedstETHSwap(swap.data, value, oldAmount, newAmount);
|
|
205
204
|
} else {
|
|
206
205
|
revert("AggregationExecutor: Dex type not supported");
|
|
207
206
|
}
|
|
@@ -216,7 +215,10 @@ contract AggregationRouterHelper is
|
|
|
216
215
|
uint256 oldAmount,
|
|
217
216
|
uint256 newAmount
|
|
218
217
|
) internal pure returns (bytes memory, uint256) {
|
|
219
|
-
|
|
218
|
+
IMultihopRouterEthereum.UniSwap memory uniSwap = abi.decode(
|
|
219
|
+
data,
|
|
220
|
+
(IMultihopRouterEthereum.UniSwap)
|
|
221
|
+
);
|
|
220
222
|
if (value > 0) uniSwap.collectAmount = value;
|
|
221
223
|
else uniSwap.collectAmount = (uniSwap.collectAmount * newAmount) / oldAmount;
|
|
222
224
|
return (abi.encode(uniSwap), uniSwap.collectAmount);
|
|
@@ -228,9 +230,9 @@ contract AggregationRouterHelper is
|
|
|
228
230
|
uint256 oldAmount,
|
|
229
231
|
uint256 newAmount
|
|
230
232
|
) internal pure returns (bytes memory, uint256) {
|
|
231
|
-
|
|
233
|
+
IMultihopRouterEthereum.StableSwap memory stableSwap = abi.decode(
|
|
232
234
|
data,
|
|
233
|
-
(
|
|
235
|
+
(IMultihopRouterEthereum.StableSwap)
|
|
234
236
|
);
|
|
235
237
|
if (value > 0) stableSwap.dx = value;
|
|
236
238
|
else stableSwap.dx = (stableSwap.dx * newAmount) / oldAmount;
|
|
@@ -243,7 +245,10 @@ contract AggregationRouterHelper is
|
|
|
243
245
|
uint256 oldAmount,
|
|
244
246
|
uint256 newAmount
|
|
245
247
|
) internal pure returns (bytes memory, uint256) {
|
|
246
|
-
|
|
248
|
+
IMultihopRouterEthereum.CurveSwap memory curveSwap = abi.decode(
|
|
249
|
+
data,
|
|
250
|
+
(IMultihopRouterEthereum.CurveSwap)
|
|
251
|
+
);
|
|
247
252
|
if (value > 0) curveSwap.dx = value;
|
|
248
253
|
else curveSwap.dx = (curveSwap.dx * newAmount) / oldAmount;
|
|
249
254
|
return (abi.encode(curveSwap), curveSwap.dx);
|
|
@@ -255,7 +260,10 @@ contract AggregationRouterHelper is
|
|
|
255
260
|
uint256 oldAmount,
|
|
256
261
|
uint256 newAmount
|
|
257
262
|
) internal pure returns (bytes memory, uint256) {
|
|
258
|
-
|
|
263
|
+
IMultihopRouterEthereum.UniSwap memory kyberDMMSwap = abi.decode(
|
|
264
|
+
data,
|
|
265
|
+
(IMultihopRouterEthereum.UniSwap)
|
|
266
|
+
);
|
|
259
267
|
if (value > 0) kyberDMMSwap.collectAmount = value;
|
|
260
268
|
else kyberDMMSwap.collectAmount = (kyberDMMSwap.collectAmount * newAmount) / oldAmount;
|
|
261
269
|
return (abi.encode(kyberDMMSwap), kyberDMMSwap.collectAmount);
|
|
@@ -267,9 +275,9 @@ contract AggregationRouterHelper is
|
|
|
267
275
|
uint256 oldAmount,
|
|
268
276
|
uint256 newAmount
|
|
269
277
|
) internal pure returns (bytes memory, uint256) {
|
|
270
|
-
|
|
278
|
+
IMultihopRouterEthereum.UniSwapV3ProMM memory uniSwapV3ProMM = abi.decode(
|
|
271
279
|
data,
|
|
272
|
-
(
|
|
280
|
+
(IMultihopRouterEthereum.UniSwapV3ProMM)
|
|
273
281
|
);
|
|
274
282
|
if (value > 0) uniSwapV3ProMM.swapAmount = value;
|
|
275
283
|
else uniSwapV3ProMM.swapAmount = (uniSwapV3ProMM.swapAmount * newAmount) / oldAmount;
|
|
@@ -282,9 +290,9 @@ contract AggregationRouterHelper is
|
|
|
282
290
|
uint256 oldAmount,
|
|
283
291
|
uint256 newAmount
|
|
284
292
|
) internal pure returns (bytes memory, uint256) {
|
|
285
|
-
|
|
293
|
+
IMultihopRouterEthereum.BalancerV2 memory balancerV2 = abi.decode(
|
|
286
294
|
data,
|
|
287
|
-
(
|
|
295
|
+
(IMultihopRouterEthereum.BalancerV2)
|
|
288
296
|
);
|
|
289
297
|
if (value > 0) balancerV2.amount = value;
|
|
290
298
|
else balancerV2.amount = (balancerV2.amount * newAmount) / oldAmount;
|
|
@@ -297,21 +305,27 @@ contract AggregationRouterHelper is
|
|
|
297
305
|
uint256 oldAmount,
|
|
298
306
|
uint256 newAmount
|
|
299
307
|
) internal pure returns (bytes memory, uint256) {
|
|
300
|
-
|
|
308
|
+
IMultihopRouterEthereum.DODO memory dodo = abi.decode(
|
|
309
|
+
data,
|
|
310
|
+
(IMultihopRouterEthereum.DODO)
|
|
311
|
+
);
|
|
301
312
|
if (value > 0) dodo.amount = value;
|
|
302
313
|
else dodo.amount = (dodo.amount * newAmount) / oldAmount;
|
|
303
314
|
return (abi.encode(dodo), dodo.amount);
|
|
304
315
|
}
|
|
305
316
|
|
|
306
|
-
function
|
|
317
|
+
function _newWrappedstETHSwap(
|
|
307
318
|
bytes memory data,
|
|
308
319
|
uint256 value,
|
|
309
320
|
uint256 oldAmount,
|
|
310
321
|
uint256 newAmount
|
|
311
322
|
) internal pure returns (bytes memory, uint256) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
323
|
+
IMultihopRouterEthereum.WSTETH memory wstEthData = abi.decode(
|
|
324
|
+
data,
|
|
325
|
+
(IMultihopRouterEthereum.WSTETH)
|
|
326
|
+
);
|
|
327
|
+
if (value > 0) wstEthData.amount = value;
|
|
328
|
+
else wstEthData.amount = (wstEthData.amount * newAmount) / oldAmount;
|
|
329
|
+
return (abi.encode(wstEthData), wstEthData.amount);
|
|
316
330
|
}
|
|
317
331
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
2
|
|
|
3
|
-
pragma solidity
|
|
3
|
+
pragma solidity 0.8.17;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface IMultihopRouter {
|
|
5
|
+
interface IMultihopRouterEthereum {
|
|
8
6
|
enum DexType {
|
|
9
7
|
UNI,
|
|
10
8
|
STABLESWAP,
|
|
@@ -15,8 +13,7 @@ interface IMultihopRouter {
|
|
|
15
13
|
BALANCERV2,
|
|
16
14
|
KYBERRFQ,
|
|
17
15
|
DODO,
|
|
18
|
-
|
|
19
|
-
PLATYPUS
|
|
16
|
+
WSTETH
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
event Exchange(address pair, uint256 amountOut, address output);
|
|
@@ -32,13 +29,18 @@ interface IMultihopRouter {
|
|
|
32
29
|
// 6: balancerv2
|
|
33
30
|
// 7: kyber RFQ
|
|
34
31
|
// 8: dodo
|
|
35
|
-
// 9:
|
|
36
|
-
// 10: platypus
|
|
32
|
+
// 9: wstETH: Lido wrapped stETH
|
|
37
33
|
//dexId:
|
|
38
34
|
// 0: firebird
|
|
39
35
|
uint16 dexOption; //dexType(8bit) + dexId(8bit)
|
|
40
36
|
}
|
|
41
37
|
|
|
38
|
+
struct WSTETH {
|
|
39
|
+
address pool;
|
|
40
|
+
uint256 amount;
|
|
41
|
+
bool isWrapping;
|
|
42
|
+
}
|
|
43
|
+
|
|
42
44
|
struct UniSwap {
|
|
43
45
|
address pool;
|
|
44
46
|
address tokenIn;
|
package/deployments/1-core.json
CHANGED
|
@@ -25,5 +25,6 @@
|
|
|
25
25
|
"vePendle": "0x4f30A9D41B80ecC5B94306AB4364951AE3170210",
|
|
26
26
|
"senderEndpoint": "0x07b1014c88f14C9E910092526db57A20052E989F",
|
|
27
27
|
"votingController": "0x44087E105137a5095c008AaB6a6530182821F2F0",
|
|
28
|
-
"gaugeController": "0x47D74516B33eD5D70ddE7119A40839f6Fcc24e57"
|
|
28
|
+
"gaugeController": "0x47D74516B33eD5D70ddE7119A40839f6Fcc24e57",
|
|
29
|
+
"feedistributor": "0xd7b34a6fDCb2A7ceD2115FF7f5fdD72aa6aA4dE2"
|
|
29
30
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumber,
|
|
7
|
+
BigNumberish,
|
|
8
|
+
BytesLike,
|
|
9
|
+
CallOverrides,
|
|
10
|
+
ContractTransaction,
|
|
11
|
+
Overrides,
|
|
12
|
+
PopulatedTransaction,
|
|
13
|
+
Signer,
|
|
14
|
+
utils,
|
|
15
|
+
} from "ethers";
|
|
16
|
+
import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
17
|
+
import { Listener, Provider } from "@ethersproject/providers";
|
|
18
|
+
import type {
|
|
19
|
+
TypedEventFilter,
|
|
20
|
+
TypedEvent,
|
|
21
|
+
TypedListener,
|
|
22
|
+
OnEvent,
|
|
23
|
+
} from "./common";
|
|
24
|
+
|
|
25
|
+
export interface BribeDistributorInterface extends utils.Interface {
|
|
26
|
+
contractName: "BribeDistributor";
|
|
27
|
+
functions: {
|
|
28
|
+
"claimReward(address)": FunctionFragment;
|
|
29
|
+
"factory()": FunctionFragment;
|
|
30
|
+
"fund(uint256[],uint256[])": FunctionFragment;
|
|
31
|
+
"incentivesForEpoch(uint256)": FunctionFragment;
|
|
32
|
+
"initialize(address,address,uint256,address)": FunctionFragment;
|
|
33
|
+
"pool()": FunctionFragment;
|
|
34
|
+
"rewardToken()": FunctionFragment;
|
|
35
|
+
"startEpoch()": FunctionFragment;
|
|
36
|
+
"userUnclaimedEpoch(address)": FunctionFragment;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
encodeFunctionData(functionFragment: "claimReward", values: [string]): string;
|
|
40
|
+
encodeFunctionData(functionFragment: "factory", values?: undefined): string;
|
|
41
|
+
encodeFunctionData(
|
|
42
|
+
functionFragment: "fund",
|
|
43
|
+
values: [BigNumberish[], BigNumberish[]]
|
|
44
|
+
): string;
|
|
45
|
+
encodeFunctionData(
|
|
46
|
+
functionFragment: "incentivesForEpoch",
|
|
47
|
+
values: [BigNumberish]
|
|
48
|
+
): string;
|
|
49
|
+
encodeFunctionData(
|
|
50
|
+
functionFragment: "initialize",
|
|
51
|
+
values: [string, string, BigNumberish, string]
|
|
52
|
+
): string;
|
|
53
|
+
encodeFunctionData(functionFragment: "pool", values?: undefined): string;
|
|
54
|
+
encodeFunctionData(
|
|
55
|
+
functionFragment: "rewardToken",
|
|
56
|
+
values?: undefined
|
|
57
|
+
): string;
|
|
58
|
+
encodeFunctionData(
|
|
59
|
+
functionFragment: "startEpoch",
|
|
60
|
+
values?: undefined
|
|
61
|
+
): string;
|
|
62
|
+
encodeFunctionData(
|
|
63
|
+
functionFragment: "userUnclaimedEpoch",
|
|
64
|
+
values: [string]
|
|
65
|
+
): string;
|
|
66
|
+
|
|
67
|
+
decodeFunctionResult(
|
|
68
|
+
functionFragment: "claimReward",
|
|
69
|
+
data: BytesLike
|
|
70
|
+
): Result;
|
|
71
|
+
decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result;
|
|
72
|
+
decodeFunctionResult(functionFragment: "fund", data: BytesLike): Result;
|
|
73
|
+
decodeFunctionResult(
|
|
74
|
+
functionFragment: "incentivesForEpoch",
|
|
75
|
+
data: BytesLike
|
|
76
|
+
): Result;
|
|
77
|
+
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
|
|
78
|
+
decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result;
|
|
79
|
+
decodeFunctionResult(
|
|
80
|
+
functionFragment: "rewardToken",
|
|
81
|
+
data: BytesLike
|
|
82
|
+
): Result;
|
|
83
|
+
decodeFunctionResult(functionFragment: "startEpoch", data: BytesLike): Result;
|
|
84
|
+
decodeFunctionResult(
|
|
85
|
+
functionFragment: "userUnclaimedEpoch",
|
|
86
|
+
data: BytesLike
|
|
87
|
+
): Result;
|
|
88
|
+
|
|
89
|
+
events: {
|
|
90
|
+
"ClaimReward(address,address,uint256,uint256)": EventFragment;
|
|
91
|
+
"Fund(uint256,uint256)": EventFragment;
|
|
92
|
+
"Initialized(uint8)": EventFragment;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
getEvent(nameOrSignatureOrTopic: "ClaimReward"): EventFragment;
|
|
96
|
+
getEvent(nameOrSignatureOrTopic: "Fund"): EventFragment;
|
|
97
|
+
getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type ClaimRewardEvent = TypedEvent<
|
|
101
|
+
[string, string, BigNumber, BigNumber],
|
|
102
|
+
{
|
|
103
|
+
user: string;
|
|
104
|
+
rewardToken: string;
|
|
105
|
+
lastEpochClaimed: BigNumber;
|
|
106
|
+
totalReward: BigNumber;
|
|
107
|
+
}
|
|
108
|
+
>;
|
|
109
|
+
|
|
110
|
+
export type ClaimRewardEventFilter = TypedEventFilter<ClaimRewardEvent>;
|
|
111
|
+
|
|
112
|
+
export type FundEvent = TypedEvent<
|
|
113
|
+
[BigNumber, BigNumber],
|
|
114
|
+
{ epoch: BigNumber; incentive: BigNumber }
|
|
115
|
+
>;
|
|
116
|
+
|
|
117
|
+
export type FundEventFilter = TypedEventFilter<FundEvent>;
|
|
118
|
+
|
|
119
|
+
export type InitializedEvent = TypedEvent<[number], { version: number }>;
|
|
120
|
+
|
|
121
|
+
export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
|
|
122
|
+
|
|
123
|
+
export interface BribeDistributor extends BaseContract {
|
|
124
|
+
contractName: "BribeDistributor";
|
|
125
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
126
|
+
attach(addressOrName: string): this;
|
|
127
|
+
deployed(): Promise<this>;
|
|
128
|
+
|
|
129
|
+
interface: BribeDistributorInterface;
|
|
130
|
+
|
|
131
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
132
|
+
event: TypedEventFilter<TEvent>,
|
|
133
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
134
|
+
toBlock?: string | number | undefined
|
|
135
|
+
): Promise<Array<TEvent>>;
|
|
136
|
+
|
|
137
|
+
listeners<TEvent extends TypedEvent>(
|
|
138
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
139
|
+
): Array<TypedListener<TEvent>>;
|
|
140
|
+
listeners(eventName?: string): Array<Listener>;
|
|
141
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
142
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
143
|
+
): this;
|
|
144
|
+
removeAllListeners(eventName?: string): this;
|
|
145
|
+
off: OnEvent<this>;
|
|
146
|
+
on: OnEvent<this>;
|
|
147
|
+
once: OnEvent<this>;
|
|
148
|
+
removeListener: OnEvent<this>;
|
|
149
|
+
|
|
150
|
+
functions: {
|
|
151
|
+
claimReward(
|
|
152
|
+
user: string,
|
|
153
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
154
|
+
): Promise<ContractTransaction>;
|
|
155
|
+
|
|
156
|
+
factory(overrides?: CallOverrides): Promise<[string]>;
|
|
157
|
+
|
|
158
|
+
fund(
|
|
159
|
+
epochs: BigNumberish[],
|
|
160
|
+
rewardsForEpoch: BigNumberish[],
|
|
161
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
162
|
+
): Promise<ContractTransaction>;
|
|
163
|
+
|
|
164
|
+
incentivesForEpoch(
|
|
165
|
+
arg0: BigNumberish,
|
|
166
|
+
overrides?: CallOverrides
|
|
167
|
+
): Promise<[BigNumber]>;
|
|
168
|
+
|
|
169
|
+
initialize(
|
|
170
|
+
_pool: string,
|
|
171
|
+
_rewardToken: string,
|
|
172
|
+
_startEpoch: BigNumberish,
|
|
173
|
+
_factory: string,
|
|
174
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
175
|
+
): Promise<ContractTransaction>;
|
|
176
|
+
|
|
177
|
+
pool(overrides?: CallOverrides): Promise<[string]>;
|
|
178
|
+
|
|
179
|
+
rewardToken(overrides?: CallOverrides): Promise<[string]>;
|
|
180
|
+
|
|
181
|
+
startEpoch(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
182
|
+
|
|
183
|
+
userUnclaimedEpoch(
|
|
184
|
+
arg0: string,
|
|
185
|
+
overrides?: CallOverrides
|
|
186
|
+
): Promise<[BigNumber]>;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
claimReward(
|
|
190
|
+
user: string,
|
|
191
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
192
|
+
): Promise<ContractTransaction>;
|
|
193
|
+
|
|
194
|
+
factory(overrides?: CallOverrides): Promise<string>;
|
|
195
|
+
|
|
196
|
+
fund(
|
|
197
|
+
epochs: BigNumberish[],
|
|
198
|
+
rewardsForEpoch: BigNumberish[],
|
|
199
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
200
|
+
): Promise<ContractTransaction>;
|
|
201
|
+
|
|
202
|
+
incentivesForEpoch(
|
|
203
|
+
arg0: BigNumberish,
|
|
204
|
+
overrides?: CallOverrides
|
|
205
|
+
): Promise<BigNumber>;
|
|
206
|
+
|
|
207
|
+
initialize(
|
|
208
|
+
_pool: string,
|
|
209
|
+
_rewardToken: string,
|
|
210
|
+
_startEpoch: BigNumberish,
|
|
211
|
+
_factory: string,
|
|
212
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
213
|
+
): Promise<ContractTransaction>;
|
|
214
|
+
|
|
215
|
+
pool(overrides?: CallOverrides): Promise<string>;
|
|
216
|
+
|
|
217
|
+
rewardToken(overrides?: CallOverrides): Promise<string>;
|
|
218
|
+
|
|
219
|
+
startEpoch(overrides?: CallOverrides): Promise<BigNumber>;
|
|
220
|
+
|
|
221
|
+
userUnclaimedEpoch(
|
|
222
|
+
arg0: string,
|
|
223
|
+
overrides?: CallOverrides
|
|
224
|
+
): Promise<BigNumber>;
|
|
225
|
+
|
|
226
|
+
callStatic: {
|
|
227
|
+
claimReward(user: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
228
|
+
|
|
229
|
+
factory(overrides?: CallOverrides): Promise<string>;
|
|
230
|
+
|
|
231
|
+
fund(
|
|
232
|
+
epochs: BigNumberish[],
|
|
233
|
+
rewardsForEpoch: BigNumberish[],
|
|
234
|
+
overrides?: CallOverrides
|
|
235
|
+
): Promise<void>;
|
|
236
|
+
|
|
237
|
+
incentivesForEpoch(
|
|
238
|
+
arg0: BigNumberish,
|
|
239
|
+
overrides?: CallOverrides
|
|
240
|
+
): Promise<BigNumber>;
|
|
241
|
+
|
|
242
|
+
initialize(
|
|
243
|
+
_pool: string,
|
|
244
|
+
_rewardToken: string,
|
|
245
|
+
_startEpoch: BigNumberish,
|
|
246
|
+
_factory: string,
|
|
247
|
+
overrides?: CallOverrides
|
|
248
|
+
): Promise<void>;
|
|
249
|
+
|
|
250
|
+
pool(overrides?: CallOverrides): Promise<string>;
|
|
251
|
+
|
|
252
|
+
rewardToken(overrides?: CallOverrides): Promise<string>;
|
|
253
|
+
|
|
254
|
+
startEpoch(overrides?: CallOverrides): Promise<BigNumber>;
|
|
255
|
+
|
|
256
|
+
userUnclaimedEpoch(
|
|
257
|
+
arg0: string,
|
|
258
|
+
overrides?: CallOverrides
|
|
259
|
+
): Promise<BigNumber>;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
filters: {
|
|
263
|
+
"ClaimReward(address,address,uint256,uint256)"(
|
|
264
|
+
user?: string | null,
|
|
265
|
+
rewardToken?: string | null,
|
|
266
|
+
lastEpochClaimed?: null,
|
|
267
|
+
totalReward?: null
|
|
268
|
+
): ClaimRewardEventFilter;
|
|
269
|
+
ClaimReward(
|
|
270
|
+
user?: string | null,
|
|
271
|
+
rewardToken?: string | null,
|
|
272
|
+
lastEpochClaimed?: null,
|
|
273
|
+
totalReward?: null
|
|
274
|
+
): ClaimRewardEventFilter;
|
|
275
|
+
|
|
276
|
+
"Fund(uint256,uint256)"(
|
|
277
|
+
epoch?: BigNumberish | null,
|
|
278
|
+
incentive?: null
|
|
279
|
+
): FundEventFilter;
|
|
280
|
+
Fund(epoch?: BigNumberish | null, incentive?: null): FundEventFilter;
|
|
281
|
+
|
|
282
|
+
"Initialized(uint8)"(version?: null): InitializedEventFilter;
|
|
283
|
+
Initialized(version?: null): InitializedEventFilter;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
estimateGas: {
|
|
287
|
+
claimReward(
|
|
288
|
+
user: string,
|
|
289
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
290
|
+
): Promise<BigNumber>;
|
|
291
|
+
|
|
292
|
+
factory(overrides?: CallOverrides): Promise<BigNumber>;
|
|
293
|
+
|
|
294
|
+
fund(
|
|
295
|
+
epochs: BigNumberish[],
|
|
296
|
+
rewardsForEpoch: BigNumberish[],
|
|
297
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
298
|
+
): Promise<BigNumber>;
|
|
299
|
+
|
|
300
|
+
incentivesForEpoch(
|
|
301
|
+
arg0: BigNumberish,
|
|
302
|
+
overrides?: CallOverrides
|
|
303
|
+
): Promise<BigNumber>;
|
|
304
|
+
|
|
305
|
+
initialize(
|
|
306
|
+
_pool: string,
|
|
307
|
+
_rewardToken: string,
|
|
308
|
+
_startEpoch: BigNumberish,
|
|
309
|
+
_factory: string,
|
|
310
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
311
|
+
): Promise<BigNumber>;
|
|
312
|
+
|
|
313
|
+
pool(overrides?: CallOverrides): Promise<BigNumber>;
|
|
314
|
+
|
|
315
|
+
rewardToken(overrides?: CallOverrides): Promise<BigNumber>;
|
|
316
|
+
|
|
317
|
+
startEpoch(overrides?: CallOverrides): Promise<BigNumber>;
|
|
318
|
+
|
|
319
|
+
userUnclaimedEpoch(
|
|
320
|
+
arg0: string,
|
|
321
|
+
overrides?: CallOverrides
|
|
322
|
+
): Promise<BigNumber>;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
populateTransaction: {
|
|
326
|
+
claimReward(
|
|
327
|
+
user: string,
|
|
328
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
329
|
+
): Promise<PopulatedTransaction>;
|
|
330
|
+
|
|
331
|
+
factory(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
332
|
+
|
|
333
|
+
fund(
|
|
334
|
+
epochs: BigNumberish[],
|
|
335
|
+
rewardsForEpoch: BigNumberish[],
|
|
336
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
337
|
+
): Promise<PopulatedTransaction>;
|
|
338
|
+
|
|
339
|
+
incentivesForEpoch(
|
|
340
|
+
arg0: BigNumberish,
|
|
341
|
+
overrides?: CallOverrides
|
|
342
|
+
): Promise<PopulatedTransaction>;
|
|
343
|
+
|
|
344
|
+
initialize(
|
|
345
|
+
_pool: string,
|
|
346
|
+
_rewardToken: string,
|
|
347
|
+
_startEpoch: BigNumberish,
|
|
348
|
+
_factory: string,
|
|
349
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
350
|
+
): Promise<PopulatedTransaction>;
|
|
351
|
+
|
|
352
|
+
pool(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
353
|
+
|
|
354
|
+
rewardToken(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
355
|
+
|
|
356
|
+
startEpoch(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
357
|
+
|
|
358
|
+
userUnclaimedEpoch(
|
|
359
|
+
arg0: string,
|
|
360
|
+
overrides?: CallOverrides
|
|
361
|
+
): Promise<PopulatedTransaction>;
|
|
362
|
+
};
|
|
363
|
+
}
|