Byte-Masons / Reliquary

50 stars 20 forks source link

Add view function to query current level of relic #26

Closed 0xSkly closed 2 years ago

0xSkly commented 2 years ago

Currently, a relic position could be stale if the position has not been updated in a while. To use the level for snapshot voting or other purposes, there is a need to get the current level of a relic without updating the position. One could do the math on the consumer side but this utilty function would make this easier.

Think your nft descriptor has the same problem, the level stays stale as long as the position is not updated

0xSkly commented 2 years ago

Initially i wanted to call it 'pendingLevel' like with the pending rewards. How do you like that? But very open. Feel free to adjust it how you see fit, no need to merge my PR, just copy it :)

Zokunei commented 2 years ago

Changes implemented in commit 6053c88057efbee20d30ee257732a67b52a377dd