Skip to content

Commit

Permalink
feat: add last used voting amount to Relay
Browse files Browse the repository at this point in the history
  • Loading branch information
ethzoomer committed Oct 25, 2023
1 parent e1af647 commit e2e8895
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/RelaySugar.vy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct Relay:
decimals: uint8
amount: uint128
voting_amount: uint256
used_voting_amount: uint256
voted_at: uint256
votes: DynArray[LpVotes, MAX_PAIRS]
token: address
Expand Down Expand Up @@ -195,6 +196,7 @@ def _byAddress(_relay: address, _account: address) -> Relay:
decimals: self.ve.decimals(),
amount: amount,
voting_amount: self.ve.balanceOfNFT(managed_id),
used_voting_amount: vote_weight,
voted_at: last_voted,
votes: votes,
token: relay.token(),
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ The returned data/struct of type `Relay` values represent:
* `decimals` - Relay veNFT token decimals
* `amount` - Relay veNFT locked amount
* `voting_amount` - Relay veNFT voting power
* `used_voting_amount` - Relay veNFT voting power used for last vote
* `voted_at` - Relay veNFT last vote timestamp
* `votes` - Relay veNFT list of pools with vote weights casted in the form of
`LpVotes`
Expand Down

0 comments on commit e2e8895

Please sign in to comment.