Skip to content

Commit

Permalink
feat: expose venft managed id (#73)
Browse files Browse the repository at this point in the history
* feat: expose venft managed id

* fix: env, CI

* test: fix veSugar veNFT output length

---------

Co-authored-by: Zoomer <[email protected]>
  • Loading branch information
pedrovalido and ethzoomer authored Jun 18, 2024
1 parent 7015ef4 commit b89e058
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion contracts/VeSugar.vy
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct VeNFT:
token: address
permanent: bool
delegate_id: uint256
managed_id: uint256

# Our contracts / Interfaces

Expand Down Expand Up @@ -200,5 +201,6 @@ def _byId(_id: uint256) -> VeNFT:
votes: votes,
token: self.token,
permanent: perma,
delegate_id: delegate_id
delegate_id: delegate_id,
managed_id: managed_id
})
4 changes: 2 additions & 2 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ DIST_ADDRESS=0x9D4736EC60715e71aFe72973f7885DCBC21EA99b
CONVERTOR_ADDRESS=0x585Af0b397AC42dbeF7f18395426BF878634f18D
RELAY_REGISTRY_ADDRESSES=0xe9F00f2e61CB0c6fb00A2e457546aCbF0fC303C2,0x6b1253B116B5919932399295C75116d33F8EfF96
SLIPSTREAM_HELPER_ADDRESS=0x5Bd7E2221C2d59c99e6A9Cd18D80A5F4257D0f32
GOVERNOR_ADDRESS=0x0000000000000000000000000000000000000000
GOVERNOR_ADDRESS=0x1F82e10D58aEf03DeA2e478029fB0387A1cbE989
LP_SUGAR_ADDRESS=0xDa888C610a00686A3cce21b7F4A45A5e52eFa572
VE_SUGAR_ADDRESS=0x37403dBd6f1b583ea244F7956fF9e37EF45c63eB
VE_SUGAR_ADDRESS=0x94f913362b232e31daB49a1aFB775cfd25DaA6a1
RELAY_SUGAR_ADDRESS=0xb8307e5842B9aeE75C704183F0355076aa74b4e2

# For testing purposes
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ To fetch a list of rewards for a specific veNFT, this method is available:
### Vote-Escrow Locked NFT (veNFT) Data

> [!NOTE]
> `VeSugar.vy` is deployed at `0x37403dBd6f1b583ea244F7956fF9e37EF45c63eB`
> `VeSugar.vy` is deployed at `0x94f913362b232e31daB49a1aFB775cfd25DaA6a1`
It allows fetching on-chain veNFT data (including the rewards accrued).
The returned data/struct of type `VeNFT` values represent:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ve_sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_byId(sugar_contract, VeNFTStruct):
venft = VeNFTStruct(*sugar_contract.byId(1))

assert venft is not None
assert len(venft) == 13
assert len(venft) == 14
assert venft.id is not None
assert len(venft.votes) > 0
assert venft.voted_at > 0
Expand All @@ -45,7 +45,7 @@ def test_byAccount(sugar_contract, VeNFTStruct):
))

assert venft is not None
assert len(venft) == 13
assert len(venft) == 14
assert venft.account == acc_venft[0].account


Expand Down

0 comments on commit b89e058

Please sign in to comment.