Skip to content

Commit 7bc9efd

Browse files
committed
refactor: remove extra gauge interface
1 parent e921c69 commit 7bc9efd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

contracts/LpSugar.vy

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@ interface ICLGauge:
188188
def feesVotingReward() -> address: view
189189
def stakedContains(_account: address, _position_id: uint256) -> bool: view
190190

191-
interface IUniversalGauge: # fetches rewards data from both v2 and v3 gauges
192-
def rewardRate() -> uint256: view
193-
def rewardRateByEpoch(_ts: uint256) -> uint256: view
194-
def rewardToken() -> address: view
195-
196191
interface INFTPositionManager:
197192
def positions(_position_id: uint256) -> PositionData: view
198193
def tokenOfOwnerByIndex(_account: address, _index: uint256) -> uint256: view
@@ -682,7 +677,7 @@ def _epochLatestByAddress(_address: address, _gauge: address) -> LpEpoch:
682677
@param _gauge The pool gauge
683678
@return A LpEpoch struct
684679
"""
685-
gauge: IUniversalGauge = IUniversalGauge(_gauge)
680+
gauge: IGauge = IGauge(_gauge)
686681
bribe: IReward = IReward(self.voter.gaugeToBribe(gauge.address))
687682

688683
epoch_start_ts: uint256 = block.timestamp / WEEK * WEEK
@@ -719,7 +714,7 @@ def _epochsByAddress(_limit: uint256, _offset: uint256, _address: address) \
719714
epochs: DynArray[LpEpoch, MAX_EPOCHS] = \
720715
empty(DynArray[LpEpoch, MAX_EPOCHS])
721716

722-
gauge: IUniversalGauge = IUniversalGauge(self.voter.gauges(_address))
717+
gauge: IGauge = IGauge(self.voter.gauges(_address))
723718

724719
if self.voter.isAlive(gauge.address) == False:
725720
return epochs

0 commit comments

Comments
 (0)