Skip to content

Commit

Permalink
fix: missing external functions on helper, remove unused from ISugarH…
Browse files Browse the repository at this point in the history
…elper interface
  • Loading branch information
pedrovalido committed Oct 24, 2024
1 parent 6e09e8d commit 6254a6c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 0 additions & 4 deletions contracts/LpSugar.vy
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,10 @@ interface ISugarHelper:
def epochLatestByAddress(_address: address, _gauge: address) -> LpEpoch: view
def epochsByAddress(_limit: uint256, _offset: uint256, _address: address) \
-> DynArray[LpEpoch, MAX_EPOCHS]: view
def epochRewards(_ts: uint256, _reward: address) \
-> DynArray[LpEpochReward, MAX_REWARDS]: view
def poolRewards(_venft_id: uint256, _pool: address, _gauge: address) \
-> DynArray[Reward, MAX_POOLS]: view
def fetchNfpm(_factory: address) -> address: view
def safeBalanceOf(_token: address, _address: address) -> uint256: view
def safeDecimals(_token: address) -> uint8: view
def safeSymbol(_token: address) -> String[100]: view
def isRootFactory(_factory: address) -> bool: view


Expand Down
14 changes: 13 additions & 1 deletion contracts/LpSugarModule.vy
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,12 @@ def _cl_position(

return pos

@external
@view
def v2Position(_account: address, _pool: address) -> Position:
return self._v2_position(_account, _pool)

@internal
@view
def _v2_position(_account: address, _pool: address) -> Position:
"""
Expand Down Expand Up @@ -1188,10 +1194,16 @@ def _safe_symbol(_token: address) -> String[100]:
)

if success:
return abi_decode(response, String[100])
return _abi_decode(response, String[100])

return "-NA-"

@external
@view
def isRootFactory(_factory: address) -> bool:
return self._is_root_factory(_factory)

@internal
@view
def _is_root_factory(_factory: address) -> bool:
"""
Expand Down

0 comments on commit 6254a6c

Please sign in to comment.