neoburger / code

neoburger smart contracts
GNU General Public License v3.0
6 stars 4 forks source link

Preliminary BurgerGov for governance token #3

Open Hecate2 opened 3 years ago

vang1ong7ang commented 3 years ago

readonly method can be placed above like below in BurgerNEO.cs

public static UInt160 Strategist() => (UInt160)Storage.Get(Storage.CurrentContext, new byte[] { PREFIXSTRATEGIST });
Hecate2 commented 3 years ago

Then we need another method in BurgerNeoGovernanceToken to check the voting result of proposals and execute the proposal? Otherwise nobody can call the methods in BurgerNeoGovernanceToken

vang1ong7ang commented 3 years ago

Then we need another method in BurgerNeoGovernanceToken to check the voting result of proposals and execute the proposal

i think so

Hecate2 commented 3 years ago

The method CountVote has been preliminarily tested, where the iterator works well. ExecuteProposal can reuse CountVote, but may cost more GAS.

Hecate2 commented 3 years ago

Ready for further complete tests

Hecate2 commented 3 years ago

Stored proposal attributes as structs in commit https://github.com/neoburger/code/pull/3/commits/f17807cf820630450f3a784331d27d43d8e5086b. Unit-tested.