CarmineOptions / konoha

A toolkit for DAO-like governance on Starknet
Apache License 2.0
23 stars 33 forks source link

fix: fix vote delegation #100

Closed EjembiEmmanuel closed 3 weeks ago

EjembiEmmanuel commented 4 weeks ago

@tensojka I've fixed the the issues with vote delegation. Please review to be sure I'm going in the right direction before I add the tests. Thank you!

EjembiEmmanuel commented 3 weeks ago

The code now compiles successfully, which was not the case initially. The initial issue was due to the absence of withdraw_delegation and delegate_vote declarations in the IProposals trait.

Additionally, there was an error in the code that retrieves the gov_token_addr. The incorrect line of code (line 400) was commented out: // let gov_token_addr = self.get_governance_token_address();

This was corrected on line 401 with the following code: let gov_token_addr = IGovernanceDispatcher { contract_address: get_contract_address() } .get_governance_token_address();

At this point, I have not yet written tests for the code. I just wanted to get your feedback before proceeding with writing the tests.

I'll start working on the tests right away!

EjembiEmmanuel commented 3 weeks ago

Still missing [] Delegate, vote and withdraw test

Otherwise LGTM!

Working on it!