@pendle/core-v2 0.18.0-testnet → 0.19.0-testnet

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.
Files changed (174) hide show
  1. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
  2. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
  3. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
  4. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
  5. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
  6. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  10. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  12. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +4 -0
  13. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +560 -0
  14. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  16. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  19. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  21. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  24. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  26. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  28. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
  29. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
  30. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
  31. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
  32. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
  33. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
  34. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  36. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  38. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  39. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  41. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  43. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  44. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
  49. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  51. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  53. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  62. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  64. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
  66. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  68. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  69. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
  70. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  71. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +86 -5
  72. package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
  73. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  74. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
  75. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  76. package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
  77. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  78. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  79. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
  80. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  81. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +24 -32
  82. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  83. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  84. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  85. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
  86. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
  87. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
  88. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -2
  89. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
  90. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +2 -2
  91. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  92. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
  93. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  94. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
  95. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
  96. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
  97. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
  98. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
  99. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  100. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
  101. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
  102. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
  103. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  104. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
  105. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  106. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
  107. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
  108. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  109. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  110. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  111. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  112. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
  113. package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.dbg.json +1 -1
  114. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
  115. package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +214 -0
  116. package/contracts/core/libraries/ArrayLib.sol +9 -0
  117. package/contracts/core/libraries/Errors.sol +9 -2
  118. package/contracts/interfaces/IPFeeDistributor.sol +10 -10
  119. package/deployments/43113-core.json +9 -3
  120. package/package.json +1 -1
  121. package/typechain-types/IPFeeDistributor.ts +43 -78
  122. package/typechain-types/IPFeeDistributorFactory.ts +53 -139
  123. package/typechain-types/PendleFeeDistributor.ts +373 -118
  124. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
  125. package/typechain-types/factories/ActionCallback__factory.ts +1 -1
  126. package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
  127. package/typechain-types/factories/ActionMisc__factory.ts +1 -1
  128. package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
  129. package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
  130. package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
  131. package/typechain-types/factories/BulkSellerFactory__factory.ts +1 -1
  132. package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
  133. package/typechain-types/factories/BulkSeller__factory.ts +1 -1
  134. package/typechain-types/factories/Errors__factory.ts +85 -4
  135. package/typechain-types/factories/IPFeeDistributorFactory__factory.ts +25 -34
  136. package/typechain-types/factories/IPFeeDistributor__factory.ts +24 -32
  137. package/typechain-types/factories/MarketMathStatic__factory.ts +1 -1
  138. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  139. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
  140. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
  141. package/typechain-types/factories/PendleFeeDistributor__factory.ts +310 -67
  142. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  143. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  144. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
  145. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  146. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  147. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  148. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  149. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  150. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  151. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  152. package/typechain-types/factories/PendleRouter__factory.ts +1 -1
  153. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  154. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  155. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  156. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  157. package/typechain-types/factories/RouterStatic__factory.ts +1 -1
  158. package/typechain-types/factories/SAPE__factory.ts +1 -1
  159. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  160. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  161. package/typechain-types/hardhat.d.ts +4 -76
  162. package/typechain-types/index.ts +2 -14
  163. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +0 -4
  164. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.json +0 -131
  165. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
  166. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -310
  167. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +0 -4
  168. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +0 -389
  169. package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.dbg.json +0 -4
  170. package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.json +0 -76
  171. package/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol +0 -159
  172. package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol +0 -99
  173. package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol +0 -70
  174. package/contracts/interfaces/IPFeeDistributorFactory.sol +0 -14
@@ -1,389 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "PendleFeeDistributorFactory",
4
- "sourceName": "contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "address",
10
- "name": "_rewardToken",
11
- "type": "address"
12
- },
13
- {
14
- "internalType": "address",
15
- "name": "_votingController",
16
- "type": "address"
17
- },
18
- {
19
- "internalType": "address",
20
- "name": "_vePendle",
21
- "type": "address"
22
- },
23
- {
24
- "internalType": "address",
25
- "name": "_feeDistributorCreationCodeContractA",
26
- "type": "address"
27
- },
28
- {
29
- "internalType": "uint256",
30
- "name": "_feeDistributorCreationCodeSizeA",
31
- "type": "uint256"
32
- },
33
- {
34
- "internalType": "address",
35
- "name": "_feeDistributorCreationCodeContractB",
36
- "type": "address"
37
- },
38
- {
39
- "internalType": "uint256",
40
- "name": "_feeDistributorCreationCodeSizeB",
41
- "type": "uint256"
42
- }
43
- ],
44
- "stateMutability": "nonpayable",
45
- "type": "constructor"
46
- },
47
- {
48
- "inputs": [
49
- {
50
- "internalType": "address",
51
- "name": "pool",
52
- "type": "address"
53
- },
54
- {
55
- "internalType": "address",
56
- "name": "distributor",
57
- "type": "address"
58
- }
59
- ],
60
- "name": "FDFactoryDistributorAlreadyExisted",
61
- "type": "error"
62
- },
63
- {
64
- "anonymous": false,
65
- "inputs": [
66
- {
67
- "indexed": false,
68
- "internalType": "uint8",
69
- "name": "version",
70
- "type": "uint8"
71
- }
72
- ],
73
- "name": "Initialized",
74
- "type": "event"
75
- },
76
- {
77
- "anonymous": false,
78
- "inputs": [
79
- {
80
- "indexed": true,
81
- "internalType": "address",
82
- "name": "previousOwner",
83
- "type": "address"
84
- },
85
- {
86
- "indexed": true,
87
- "internalType": "address",
88
- "name": "newOwner",
89
- "type": "address"
90
- }
91
- ],
92
- "name": "OwnershipTransferred",
93
- "type": "event"
94
- },
95
- {
96
- "inputs": [],
97
- "name": "claimOwnership",
98
- "outputs": [],
99
- "stateMutability": "nonpayable",
100
- "type": "function"
101
- },
102
- {
103
- "inputs": [
104
- {
105
- "internalType": "address",
106
- "name": "pool",
107
- "type": "address"
108
- },
109
- {
110
- "internalType": "uint64",
111
- "name": "startTime",
112
- "type": "uint64"
113
- }
114
- ],
115
- "name": "createFeeDistributor",
116
- "outputs": [
117
- {
118
- "internalType": "address",
119
- "name": "distributor",
120
- "type": "address"
121
- }
122
- ],
123
- "stateMutability": "nonpayable",
124
- "type": "function"
125
- },
126
- {
127
- "inputs": [],
128
- "name": "feeDistributorCreationCodeContractA",
129
- "outputs": [
130
- {
131
- "internalType": "address",
132
- "name": "",
133
- "type": "address"
134
- }
135
- ],
136
- "stateMutability": "view",
137
- "type": "function"
138
- },
139
- {
140
- "inputs": [],
141
- "name": "feeDistributorCreationCodeContractB",
142
- "outputs": [
143
- {
144
- "internalType": "address",
145
- "name": "",
146
- "type": "address"
147
- }
148
- ],
149
- "stateMutability": "view",
150
- "type": "function"
151
- },
152
- {
153
- "inputs": [],
154
- "name": "feeDistributorCreationCodeSizeA",
155
- "outputs": [
156
- {
157
- "internalType": "uint256",
158
- "name": "",
159
- "type": "uint256"
160
- }
161
- ],
162
- "stateMutability": "view",
163
- "type": "function"
164
- },
165
- {
166
- "inputs": [],
167
- "name": "feeDistributorCreationCodeSizeB",
168
- "outputs": [
169
- {
170
- "internalType": "uint256",
171
- "name": "",
172
- "type": "uint256"
173
- }
174
- ],
175
- "stateMutability": "view",
176
- "type": "function"
177
- },
178
- {
179
- "inputs": [
180
- {
181
- "internalType": "address",
182
- "name": "user",
183
- "type": "address"
184
- },
185
- {
186
- "internalType": "address",
187
- "name": "pool",
188
- "type": "address"
189
- },
190
- {
191
- "internalType": "uint256",
192
- "name": "epoch",
193
- "type": "uint256"
194
- }
195
- ],
196
- "name": "getUserAndTotalSharesAt",
197
- "outputs": [
198
- {
199
- "internalType": "uint256",
200
- "name": "userShare",
201
- "type": "uint256"
202
- },
203
- {
204
- "internalType": "uint256",
205
- "name": "totalShare",
206
- "type": "uint256"
207
- }
208
- ],
209
- "stateMutability": "view",
210
- "type": "function"
211
- },
212
- {
213
- "inputs": [],
214
- "name": "lastFinishedEpoch",
215
- "outputs": [
216
- {
217
- "internalType": "uint256",
218
- "name": "",
219
- "type": "uint256"
220
- }
221
- ],
222
- "stateMutability": "view",
223
- "type": "function"
224
- },
225
- {
226
- "inputs": [],
227
- "name": "owner",
228
- "outputs": [
229
- {
230
- "internalType": "address",
231
- "name": "",
232
- "type": "address"
233
- }
234
- ],
235
- "stateMutability": "view",
236
- "type": "function"
237
- },
238
- {
239
- "inputs": [],
240
- "name": "pendingOwner",
241
- "outputs": [
242
- {
243
- "internalType": "address",
244
- "name": "",
245
- "type": "address"
246
- }
247
- ],
248
- "stateMutability": "view",
249
- "type": "function"
250
- },
251
- {
252
- "inputs": [
253
- {
254
- "internalType": "address",
255
- "name": "",
256
- "type": "address"
257
- }
258
- ],
259
- "name": "poolInfos",
260
- "outputs": [
261
- {
262
- "internalType": "address",
263
- "name": "distributor",
264
- "type": "address"
265
- },
266
- {
267
- "internalType": "uint64",
268
- "name": "startTime",
269
- "type": "uint64"
270
- }
271
- ],
272
- "stateMutability": "view",
273
- "type": "function"
274
- },
275
- {
276
- "inputs": [],
277
- "name": "rewardToken",
278
- "outputs": [
279
- {
280
- "internalType": "address",
281
- "name": "",
282
- "type": "address"
283
- }
284
- ],
285
- "stateMutability": "view",
286
- "type": "function"
287
- },
288
- {
289
- "inputs": [
290
- {
291
- "internalType": "address",
292
- "name": "newOwner",
293
- "type": "address"
294
- },
295
- {
296
- "internalType": "bool",
297
- "name": "direct",
298
- "type": "bool"
299
- },
300
- {
301
- "internalType": "bool",
302
- "name": "renounce",
303
- "type": "bool"
304
- }
305
- ],
306
- "name": "transferOwnership",
307
- "outputs": [],
308
- "stateMutability": "nonpayable",
309
- "type": "function"
310
- },
311
- {
312
- "inputs": [
313
- {
314
- "internalType": "address",
315
- "name": "user",
316
- "type": "address"
317
- },
318
- {
319
- "internalType": "address",
320
- "name": "pool",
321
- "type": "address"
322
- }
323
- ],
324
- "name": "updateUserShare",
325
- "outputs": [],
326
- "stateMutability": "nonpayable",
327
- "type": "function"
328
- },
329
- {
330
- "inputs": [
331
- {
332
- "internalType": "address",
333
- "name": "",
334
- "type": "address"
335
- },
336
- {
337
- "internalType": "address",
338
- "name": "",
339
- "type": "address"
340
- }
341
- ],
342
- "name": "userInfo",
343
- "outputs": [
344
- {
345
- "internalType": "uint128",
346
- "name": "timestamp",
347
- "type": "uint128"
348
- },
349
- {
350
- "internalType": "uint128",
351
- "name": "iter",
352
- "type": "uint128"
353
- }
354
- ],
355
- "stateMutability": "view",
356
- "type": "function"
357
- },
358
- {
359
- "inputs": [],
360
- "name": "vePendle",
361
- "outputs": [
362
- {
363
- "internalType": "address",
364
- "name": "",
365
- "type": "address"
366
- }
367
- ],
368
- "stateMutability": "view",
369
- "type": "function"
370
- },
371
- {
372
- "inputs": [],
373
- "name": "votingController",
374
- "outputs": [
375
- {
376
- "internalType": "address",
377
- "name": "",
378
- "type": "address"
379
- }
380
- ],
381
- "stateMutability": "view",
382
- "type": "function"
383
- }
384
- ],
385
- "bytecode": "0x6101606040523480156200001257600080fd5b5060405162001a1d38038062001a1d833981016040819052620000359162000271565b6001600160a01b03868116608052851660a052600154600160a81b900460ff16158080156200006f575060018054600160a01b900460ff16105b80620000a557506200008c30620001c260201b620007b21760201c565b158015620000a5575060018054600160a01b900460ff16145b6200010e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6001805460ff60a01b1916600160a01b17905580156200013c576001805460ff60a81b1916600160a81b1790555b62000146620001d1565b6001600160a01b038089166101405285811660c05260e08590528316610100526101208290528015620001b4576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050620002f4565b6001600160a01b03163b151590565b600154600160a81b900460ff16620002405760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000105565b600080546001600160a01b03191633179055565b80516001600160a01b03811681146200026c57600080fd5b919050565b600080600080600080600060e0888a0312156200028d57600080fd5b620002988862000254565b9650620002a86020890162000254565b9550620002b86040890162000254565b9450620002c86060890162000254565b935060808801519250620002df60a0890162000254565b915060c0880151905092959891949750929550565b60805160a05160c05160e051610100516101205161014051611657620003c66000396000818161034a01526105a90152600081816101c0015261065801526000818161032301526106370152600081816101f501526106160152600081816102a501526105f501526000818161026b015281816108090152818161085e015281816109470152818161098001528181610e7201528181610ec001528181610f950152610ff20152600081816102240152818161091001528181610a1901528181610f54015261107c01526116576000f3fe608060405234801561001057600080fd5b50600436106100db5760003560e01c8063078dfbe7146100e05780630f208beb146100f557806342340a5614610159578063428c37ef146101bb57806344d68199146101f05780634e71e0c814610217578063517afbcf1461021f57806361565a8f1461025357806382dabb21146102665780638da5cb5b1461028d57806396c6d825146102a0578063b9a53a84146102c7578063c0aabb0d146102d0578063c6adc068146102f8578063e30c39781461030b578063f5636a321461031e578063f7c618c114610345575b600080fd5b6100f36100ee36600461128d565b61036c565b005b6101346101033660046112d0565b60326020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b604080516001600160801b039384168152929091166020830152015b60405180910390f35b610194610167366004611303565b6035602052600090815260409020546001600160a01b03811690600160a01b90046001600160401b031682565b604080516001600160a01b0390931683526001600160401b03909116602083015201610150565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610150565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b6100f3610472565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b604051610150919061131e565b610246610261366004611332565b61051d565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b600054610246906001600160a01b031681565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b6101e260345481565b6102e36102de366004611375565b61074e565b60408051928352602083019190915201610150565b6100f36103063660046112d0565b61079b565b600154610246906001600160a01b031681565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b0316331461039f5760405162461bcd60e51b8152600401610396906113b1565b60405180910390fd5b8115610450576001600160a01b0383161515806103b95750805b6103fd5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b6044820152606401610396565b600080546040516001600160a01b038087169392169160008051602061160283398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b03163381146104cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152606401610396565b600080546040516001600160a01b038085169392169160008051602061160283398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b600080546001600160a01b031633146105485760405162461bcd60e51b8152600401610396906113b1565b6001600160a01b0383811660009081526035602052604090205416156105a0576001600160a01b03808416600090815260356020526040908190205490516320babb1d60e11b815261039692869216906004016113e6565b61067c600080857f0000000000000000000000000000000000000000000000000000000000000000866001600160401b03166040516020016105e493929190611400565b6040516020818303038152906040527f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006107c1565b60405163078dfbe760e01b815233600482015260016024820152600060448201529091506001600160a01b0382169063078dfbe790606401600060405180830381600087803b1580156106ce57600080fd5b505af11580156106e2573d6000803e3d6000fd5b50506040805180820182526001600160a01b0380861682526001600160401b0396871660208084019182529882166000908152603590995292909720905181549251909616600160a01b026001600160e01b031990921695909616949094179390931790935592915050565b6001600160a01b0380841660009081526033602090815260408083209386168352928152828220848352905290812054906107918461078c856107eb565b610805565b9050935093915050565b6107a481610945565b6107ae8282610a83565b5050565b6001600160a01b03163b151590565b6000806107d18787878787610d01565b90506107de898983610d53565b9998505050505050505050565b60006001600160801b0382111561080157600080fd5b5090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316036108e25760405163947975d960e01b81526001600160801b03831660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063947975d9906024015b602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d2919061143b565b6001600160801b0316905061093f565b60405163f144cf1760e01b81526001600160a01b0384811660048301526001600160801b03841660248301527f0000000000000000000000000000000000000000000000000000000000000000169063f144cf1790604401610891565b92915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031603610a02577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166330d981af6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156109de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061143b565b604051630e2e1d9760e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906338b8765c90610a4e90849060040161131e565b600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b5050505050565b6000610a8d610e5e565b6001600160a01b038085166000908152603260209081526040808320938716835292905220549091506001600160801b039081169082168103610ad05750505050565b806001600160801b0316600003610b0c57506001600160a01b038216600090815260356020526040902054600160a01b90046001600160401b03165b6000610b188585610e6e565b905080600003610b6c5750506001600160a01b0392831660009081526032602090815260408083209490951682529290925291902080546001600160801b0319166001600160801b03909216919091179055565b6001600160a01b038581166000908152603260209081526040808320938816835292905290812054600160801b90046001600160801b031690610bb0878784610f8b565b9050610bba611212565b83610bc684600161146c565b6001600160801b03161015610bf657610bf38888610be586600161146c565b6001600160801b0316610f8b565b90505b856001600160801b0316856001600160801b03161015610c9f57610c1d62093a808661146c565b9450610c2e8888868686868b6110b5565b925081600001516001600160801b0316856001600160801b031610610c9a576020820151610c5c908661114f565b6001600160a01b03808a166000908152603360209081526040808320938c1683529281528282206001600160801b038a811684529152919020911690555b610bf6565b50506040805180820182526001600160801b03958616815291851660208084019182526001600160a01b0398891660009081526032825283812098909916895296909652909520945193518316600160801b0293909216929092179092555050565b8451604080516020848701808501808401830190945283835291939192908401876000828b3c856000898301893c5060208981019085850101610d458183866111a2565b505050505095945050505050565b60008084471015610da65760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610396565b8251600003610df75760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610396565b8383516020850187f590506001600160a01b038116610e545760405162461bcd60e51b8152602060048201526019602482015278437265617465323a204661696c6564206f6e206465706c6f7960381b6044820152606401610396565b90505b9392505050565b6000610e69426111e0565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031603610f3d5760405163fc367c6160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063fc367c6190610ef590869060040161131e565b602060405180830381865afa158015610f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f369190611493565b905061093f565b604051633575141360e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636aea282690610ef590869086906004016113e6565b610f93611212565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03160361106557604051637c386c7160e01b81526001600160a01b038581166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690637c386c71906044015b606060405180830381865afa15801561103a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e91906114e2565b9050610e57565b60405163632c096d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063632c096d9061101d90879087908790600401611400565b60005b856110c486600161146c565b6001600160801b03161080156110ef575082600001516001600160801b0316826001600160801b0316115b15611143576110fe84846111fa565b8561110a86600261146c565b6001600160801b031610156111335761113361112c8989610be589600261146c565b84906111fa565b61113c85611554565b94506110b8565b50929695505050505050565b600082600001516001600160801b031682846020015161116f9190611582565b6001600160801b031611156111865750600061093f565b8183602001516111969190611582565b8351610e5791906115ad565b5b602081106111c2578151835260209283019290910190601f19016111a3565b905182516020929092036101000a6000190180199091169116179052565b600062093a806111f081846115cd565b61093f9190611582565b80516001600160801b03168252602090810151910152565b604051806040016040528060006001600160801b0316815260200161125c604051806040016040528060006001600160801b0316815260200160006001600160801b031681525090565b905290565b80356001600160a01b038116811461127857600080fd5b919050565b8035801515811461127857600080fd5b6000806000606084860312156112a257600080fd5b6112ab84611261565b92506112b96020850161127d565b91506112c76040850161127d565b90509250925092565b600080604083850312156112e357600080fd5b6112ec83611261565b91506112fa60208401611261565b90509250929050565b60006020828403121561131557600080fd5b610e5782611261565b6001600160a01b0391909116815260200190565b6000806040838503121561134557600080fd5b61134e83611261565b915060208301356001600160401b038116811461136a57600080fd5b809150509250929050565b60008060006060848603121561138a57600080fd5b61139384611261565b92506113a160208501611261565b9150604084013590509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b80516001600160801b038116811461127857600080fd5b60006020828403121561144d57600080fd5b610e5782611424565b634e487b7160e01b600052601160045260246000fd5b6001600160801b0381811683821601908082111561148c5761148c611456565b5092915050565b6000602082840312156114a557600080fd5b5051919050565b604080519081016001600160401b03811182821017156114dc57634e487b7160e01b600052604160045260246000fd5b60405290565b600081830360608112156114f557600080fd5b6114fd6114ac565b61150684611424565b81526040601f198301121561151a57600080fd5b6115226114ac565b915061153060208501611424565b825261153e60408501611424565b6020830152816020820152809250505092915050565b60006001600160801b038281166002600160801b0319810161157857611578611456565b6001019392505050565b6001600160801b038181168382160280821691908281146115a5576115a5611456565b505092915050565b6001600160801b0382811682821603908082111561148c5761148c611456565b60006001600160801b03838116806115f557634e487b7160e01b600052601260045260246000fd5b9216919091049291505056fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220fe22e4e2c57eb7115de218bbf1df3f86537683d3965b1aca1e48e144f79a179364736f6c63430008110033",
386
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100db5760003560e01c8063078dfbe7146100e05780630f208beb146100f557806342340a5614610159578063428c37ef146101bb57806344d68199146101f05780634e71e0c814610217578063517afbcf1461021f57806361565a8f1461025357806382dabb21146102665780638da5cb5b1461028d57806396c6d825146102a0578063b9a53a84146102c7578063c0aabb0d146102d0578063c6adc068146102f8578063e30c39781461030b578063f5636a321461031e578063f7c618c114610345575b600080fd5b6100f36100ee36600461128d565b61036c565b005b6101346101033660046112d0565b60326020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b604080516001600160801b039384168152929091166020830152015b60405180910390f35b610194610167366004611303565b6035602052600090815260409020546001600160a01b03811690600160a01b90046001600160401b031682565b604080516001600160a01b0390931683526001600160401b03909116602083015201610150565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610150565b6101e27f000000000000000000000000000000000000000000000000000000000000000081565b6100f3610472565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b604051610150919061131e565b610246610261366004611332565b61051d565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b600054610246906001600160a01b031681565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b6101e260345481565b6102e36102de366004611375565b61074e565b60408051928352602083019190915201610150565b6100f36103063660046112d0565b61079b565b600154610246906001600160a01b031681565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b6102467f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b0316331461039f5760405162461bcd60e51b8152600401610396906113b1565b60405180910390fd5b8115610450576001600160a01b0383161515806103b95750805b6103fd5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b6044820152606401610396565b600080546040516001600160a01b038087169392169160008051602061160283398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b03163381146104cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152606401610396565b600080546040516001600160a01b038085169392169160008051602061160283398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b600080546001600160a01b031633146105485760405162461bcd60e51b8152600401610396906113b1565b6001600160a01b0383811660009081526035602052604090205416156105a0576001600160a01b03808416600090815260356020526040908190205490516320babb1d60e11b815261039692869216906004016113e6565b61067c600080857f0000000000000000000000000000000000000000000000000000000000000000866001600160401b03166040516020016105e493929190611400565b6040516020818303038152906040527f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006107c1565b60405163078dfbe760e01b815233600482015260016024820152600060448201529091506001600160a01b0382169063078dfbe790606401600060405180830381600087803b1580156106ce57600080fd5b505af11580156106e2573d6000803e3d6000fd5b50506040805180820182526001600160a01b0380861682526001600160401b0396871660208084019182529882166000908152603590995292909720905181549251909616600160a01b026001600160e01b031990921695909616949094179390931790935592915050565b6001600160a01b0380841660009081526033602090815260408083209386168352928152828220848352905290812054906107918461078c856107eb565b610805565b9050935093915050565b6107a481610945565b6107ae8282610a83565b5050565b6001600160a01b03163b151590565b6000806107d18787878787610d01565b90506107de898983610d53565b9998505050505050505050565b60006001600160801b0382111561080157600080fd5b5090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316036108e25760405163947975d960e01b81526001600160801b03831660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063947975d9906024015b602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d2919061143b565b6001600160801b0316905061093f565b60405163f144cf1760e01b81526001600160a01b0384811660048301526001600160801b03841660248301527f0000000000000000000000000000000000000000000000000000000000000000169063f144cf1790604401610891565b92915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031603610a02577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166330d981af6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156109de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061143b565b604051630e2e1d9760e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906338b8765c90610a4e90849060040161131e565b600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b5050505050565b6000610a8d610e5e565b6001600160a01b038085166000908152603260209081526040808320938716835292905220549091506001600160801b039081169082168103610ad05750505050565b806001600160801b0316600003610b0c57506001600160a01b038216600090815260356020526040902054600160a01b90046001600160401b03165b6000610b188585610e6e565b905080600003610b6c5750506001600160a01b0392831660009081526032602090815260408083209490951682529290925291902080546001600160801b0319166001600160801b03909216919091179055565b6001600160a01b038581166000908152603260209081526040808320938816835292905290812054600160801b90046001600160801b031690610bb0878784610f8b565b9050610bba611212565b83610bc684600161146c565b6001600160801b03161015610bf657610bf38888610be586600161146c565b6001600160801b0316610f8b565b90505b856001600160801b0316856001600160801b03161015610c9f57610c1d62093a808661146c565b9450610c2e8888868686868b6110b5565b925081600001516001600160801b0316856001600160801b031610610c9a576020820151610c5c908661114f565b6001600160a01b03808a166000908152603360209081526040808320938c1683529281528282206001600160801b038a811684529152919020911690555b610bf6565b50506040805180820182526001600160801b03958616815291851660208084019182526001600160a01b0398891660009081526032825283812098909916895296909652909520945193518316600160801b0293909216929092179092555050565b8451604080516020848701808501808401830190945283835291939192908401876000828b3c856000898301893c5060208981019085850101610d458183866111a2565b505050505095945050505050565b60008084471015610da65760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610396565b8251600003610df75760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610396565b8383516020850187f590506001600160a01b038116610e545760405162461bcd60e51b8152602060048201526019602482015278437265617465323a204661696c6564206f6e206465706c6f7960381b6044820152606401610396565b90505b9392505050565b6000610e69426111e0565b905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031603610f3d5760405163fc367c6160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063fc367c6190610ef590869060040161131e565b602060405180830381865afa158015610f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f369190611493565b905061093f565b604051633575141360e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636aea282690610ef590869086906004016113e6565b610f93611212565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03160361106557604051637c386c7160e01b81526001600160a01b038581166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690637c386c71906044015b606060405180830381865afa15801561103a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e91906114e2565b9050610e57565b60405163632c096d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063632c096d9061101d90879087908790600401611400565b60005b856110c486600161146c565b6001600160801b03161080156110ef575082600001516001600160801b0316826001600160801b0316115b15611143576110fe84846111fa565b8561110a86600261146c565b6001600160801b031610156111335761113361112c8989610be589600261146c565b84906111fa565b61113c85611554565b94506110b8565b50929695505050505050565b600082600001516001600160801b031682846020015161116f9190611582565b6001600160801b031611156111865750600061093f565b8183602001516111969190611582565b8351610e5791906115ad565b5b602081106111c2578151835260209283019290910190601f19016111a3565b905182516020929092036101000a6000190180199091169116179052565b600062093a806111f081846115cd565b61093f9190611582565b80516001600160801b03168252602090810151910152565b604051806040016040528060006001600160801b0316815260200161125c604051806040016040528060006001600160801b0316815260200160006001600160801b031681525090565b905290565b80356001600160a01b038116811461127857600080fd5b919050565b8035801515811461127857600080fd5b6000806000606084860312156112a257600080fd5b6112ab84611261565b92506112b96020850161127d565b91506112c76040850161127d565b90509250925092565b600080604083850312156112e357600080fd5b6112ec83611261565b91506112fa60208401611261565b90509250929050565b60006020828403121561131557600080fd5b610e5782611261565b6001600160a01b0391909116815260200190565b6000806040838503121561134557600080fd5b61134e83611261565b915060208301356001600160401b038116811461136a57600080fd5b809150509250929050565b60008060006060848603121561138a57600080fd5b61139384611261565b92506113a160208501611261565b9150604084013590509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b80516001600160801b038116811461127857600080fd5b60006020828403121561144d57600080fd5b610e5782611424565b634e487b7160e01b600052601160045260246000fd5b6001600160801b0381811683821601908082111561148c5761148c611456565b5092915050565b6000602082840312156114a557600080fd5b5051919050565b604080519081016001600160401b03811182821017156114dc57634e487b7160e01b600052604160045260246000fd5b60405290565b600081830360608112156114f557600080fd5b6114fd6114ac565b61150684611424565b81526040601f198301121561151a57600080fd5b6115226114ac565b915061153060208501611424565b825261153e60408501611424565b6020830152816020820152809250505092915050565b60006001600160801b038281166002600160801b0319810161157857611578611456565b6001019392505050565b6001600160801b038181168382160280821691908281146115a5576115a5611456565b505092915050565b6001600160801b0382811682821603908082111561148c5761148c611456565b60006001600160801b03838116806115f557634e487b7160e01b600052601260045260246000fd5b9216919091049291505056fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220fe22e4e2c57eb7115de218bbf1df3f86537683d3965b1aca1e48e144f79a179364736f6c63430008110033",
387
- "linkReferences": {},
388
- "deployedLinkReferences": {}
389
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/cfaee2011af0cd925c44a0b8d7310816.json"
4
- }
@@ -1,76 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "IPFeeDistributorFactory",
4
- "sourceName": "contracts/interfaces/IPFeeDistributorFactory.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "address",
10
- "name": "user",
11
- "type": "address"
12
- },
13
- {
14
- "internalType": "address",
15
- "name": "pool",
16
- "type": "address"
17
- },
18
- {
19
- "internalType": "uint256",
20
- "name": "epoch",
21
- "type": "uint256"
22
- }
23
- ],
24
- "name": "getUserAndTotalSharesAt",
25
- "outputs": [
26
- {
27
- "internalType": "uint256",
28
- "name": "userShare",
29
- "type": "uint256"
30
- },
31
- {
32
- "internalType": "uint256",
33
- "name": "totalShare",
34
- "type": "uint256"
35
- }
36
- ],
37
- "stateMutability": "view",
38
- "type": "function"
39
- },
40
- {
41
- "inputs": [],
42
- "name": "lastFinishedEpoch",
43
- "outputs": [
44
- {
45
- "internalType": "uint256",
46
- "name": "",
47
- "type": "uint256"
48
- }
49
- ],
50
- "stateMutability": "nonpayable",
51
- "type": "function"
52
- },
53
- {
54
- "inputs": [
55
- {
56
- "internalType": "address",
57
- "name": "user",
58
- "type": "address"
59
- },
60
- {
61
- "internalType": "address",
62
- "name": "pool",
63
- "type": "address"
64
- }
65
- ],
66
- "name": "updateUserShare",
67
- "outputs": [],
68
- "stateMutability": "nonpayable",
69
- "type": "function"
70
- }
71
- ],
72
- "bytecode": "0x",
73
- "deployedBytecode": "0x",
74
- "linkReferences": {},
75
- "deployedLinkReferences": {}
76
- }
@@ -1,159 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity 0.8.17;
3
-
4
- import "./PendleFeeDistributor.sol";
5
- import "../../interfaces/IPVotingEscrowMainchain.sol";
6
- import "../../interfaces/IPVotingController.sol";
7
- import "../../interfaces/IPFeeDistributorFactory.sol";
8
- import "../../core/libraries/BoringOwnableUpgradeable.sol";
9
- import "../libraries/VeHistoryLib.sol";
10
- import "../libraries/WeekMath.sol";
11
-
12
- abstract contract EpochResultManager is IPFeeDistributorFactory {
13
- using Math for uint256;
14
- using ArrayLib for address[];
15
- using VeBalanceLib for VeBalance;
16
- using CheckpointHelper for Checkpoint;
17
-
18
- struct UserInfo {
19
- uint128 timestamp;
20
- uint128 iter;
21
- }
22
-
23
- address public immutable votingController;
24
- address public immutable vePendle;
25
-
26
- // [user, pool] => UserInfo
27
- mapping(address => mapping(address => UserInfo)) public userInfo;
28
-
29
- // [user, pool, epoch] => share
30
- mapping(address => mapping(address => mapping(uint256 => uint256))) internal userShareAtEpoch;
31
-
32
- constructor(address _votingController, address _vePendle) {
33
- votingController = _votingController;
34
- vePendle = _vePendle;
35
- }
36
-
37
- function updateUserShare(address user, address pool) external {
38
- _updateExternalGlobalShares(pool);
39
- _updateUserShare(user, pool);
40
- }
41
-
42
- function getUserAndTotalSharesAt(
43
- address user,
44
- address pool,
45
- uint256 epoch
46
- ) external view returns (uint256 userShare, uint256 totalShare) {
47
- userShare = userShareAtEpoch[user][pool][epoch];
48
- totalShare = _getExternalTotalShares(pool, epoch.Uint128());
49
- }
50
-
51
- function _updateUserShare(address user, address pool) internal {
52
- uint128 currentEpoch = WeekMath.getCurrentWeekStart();
53
- uint128 userEpoch = userInfo[user][pool].timestamp;
54
-
55
- if (userEpoch == currentEpoch) return;
56
- if (userEpoch == 0) userEpoch = _getPoolStartTime(pool);
57
-
58
- uint256 length = _getExternalUserHistoryLength(user, pool);
59
- if (length == 0) {
60
- userInfo[user][pool].timestamp = currentEpoch;
61
- return;
62
- }
63
-
64
- uint128 iter = userInfo[user][pool].iter;
65
- Checkpoint memory lowerCheckpoint = _getExternalUserCheckpointAt(user, pool, iter);
66
- Checkpoint memory upperCheckpoint;
67
-
68
- if (iter + 1 < length) {
69
- upperCheckpoint = _getExternalUserCheckpointAt(user, pool, iter + 1);
70
- }
71
-
72
- while (userEpoch < currentEpoch) {
73
- userEpoch += WeekMath.WEEK;
74
-
75
- iter = _moveIterToNextEpoch(
76
- user,
77
- pool,
78
- length,
79
- iter,
80
- lowerCheckpoint,
81
- upperCheckpoint,
82
- userEpoch
83
- );
84
-
85
- if (userEpoch >= lowerCheckpoint.timestamp) {
86
- userShareAtEpoch[user][pool][userEpoch] = lowerCheckpoint.value.getValueAt(
87
- userEpoch
88
- );
89
- }
90
- }
91
-
92
- userInfo[user][pool] = UserInfo({ timestamp: currentEpoch, iter: iter });
93
- }
94
-
95
- function _moveIterToNextEpoch(
96
- address user,
97
- address pool,
98
- uint256 userHistoryLength,
99
- uint128 iter,
100
- Checkpoint memory lowerCheckpoint,
101
- Checkpoint memory upperCheckpoint,
102
- uint128 nextEpoch
103
- ) internal view returns (uint128) {
104
- while (iter + 1 < userHistoryLength && nextEpoch > upperCheckpoint.timestamp) {
105
- lowerCheckpoint.assignWith(upperCheckpoint);
106
- if (iter + 2 < userHistoryLength) {
107
- upperCheckpoint.assignWith(_getExternalUserCheckpointAt(user, pool, iter + 2));
108
- }
109
- ++iter;
110
- }
111
- return iter;
112
- }
113
-
114
- function _updateExternalGlobalShares(address pool) internal {
115
- if (pool == vePendle) {
116
- IPVeToken(vePendle).totalSupplyCurrent();
117
- } else {
118
- IPVotingController(votingController).applyPoolSlopeChanges(pool);
119
- }
120
- }
121
-
122
- function _getExternalTotalShares(address pool, uint128 timestamp)
123
- internal
124
- view
125
- returns (uint256)
126
- {
127
- if (pool == vePendle) {
128
- return IPVotingEscrowMainchain(vePendle).totalSupplyAt(timestamp);
129
- } else {
130
- return IPVotingController(votingController).getPoolTotalVoteAt(pool, timestamp);
131
- }
132
- }
133
-
134
- function _getExternalUserCheckpointAt(
135
- address user,
136
- address pool,
137
- uint256 index
138
- ) internal view returns (Checkpoint memory) {
139
- if (pool == vePendle) {
140
- return IPVotingEscrowMainchain(vePendle).getUserHistoryAt(user, index);
141
- } else {
142
- return IPVotingController(votingController).getUserPoolHistoryAt(user, pool, index);
143
- }
144
- }
145
-
146
- function _getExternalUserHistoryLength(address user, address pool)
147
- internal
148
- view
149
- returns (uint256)
150
- {
151
- if (pool == vePendle) {
152
- return IPVotingEscrowMainchain(vePendle).getUserHistoryLength(user);
153
- } else {
154
- return IPVotingController(votingController).getUserPoolHistoryLength(user, pool);
155
- }
156
- }
157
-
158
- function _getPoolStartTime(address pool) internal view virtual returns (uint64);
159
- }