Closed fnanni-0 closed 3 years ago
Thanks @fnanni-0, looking into the review right now.
Changes implemented here: https://github.com/DemocracyEarth/ubi/pull/39
Kept the simplistic approach yet I think in the future we could improve accrual mechanism with something analogue to how rebasing works in Ampleforth
Beware that the current snapshot id is not visible to external contracts directly. You can only access it by querying the Snapshot event. I'm not sure if this could become an issue in the future. You might want to make the snapshot() function return the current id, and maybe even store it.
Hi @fnanni-0 , took your advice and implemented here.. looks like after all is probably better to bring upfront the functionality of snapshot
itself to the main contract. check the changes here: https://github.com/DemocracyEarth/ubi/compare/issuance
@santisiri that won't work because you can't override the private variable _currentSnapShortId
.
I think it would be enough to just return the new id:
function snapshot() external onlyByGovernor returns(uint256) {
return _snapshot();
}
Ah.. I see.. now that makes sense. Thanks @fnanni-0, will fix and merge now.
https://docs.google.com/document/d/1FHmn5Xwk8ECfjV76YiqCNj39uLGNyBLd3qt-OWHdOs4/edit?usp=sharing