Skip to content

Commit

Permalink
VeSugar: optional gov calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
stas committed Nov 3, 2024
1 parent b120fdf commit f834b82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/VeSugar.vy
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ def _byId(_id: uint256) -> VeNFT:
perma: bool = False
amount, expires_at, perma = staticcall self.ve.locked(_id)
last_voted: uint256 = 0
governance_amount: uint256 = 0

governance_amount: uint256 = staticcall self.gov.getVotes(_id, block.timestamp)
if self.gov.address != empty(address):
governance_amount = staticcall self.gov.getVotes(_id, block.timestamp)

delegate_id: uint256 = staticcall self.ve.delegates(_id)
managed_id: uint256 = staticcall self.ve.idToManaged(_id)
Expand Down

0 comments on commit f834b82

Please sign in to comment.