-
Notifications
You must be signed in to change notification settings - Fork 0
Add governance and policy contracts #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cloud8little
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
From the user's point of view, there is no function for users to get their voted draftIds. If someone has voted for several proposals in the past phases, he must walk through the previous transactions to find the draftIds and then get his ethers back (Unless he wrote them down somewhere by himself). |
|
merge? |
May be will need a UI for users to vote, and will list all the voted draft from event log. |
dbc2cc3 to
f9ec2ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the PR was updated, so I'm leaving existing comments here for now and continue review once my review is re-requested.
@chenquanyu, please, tag me once you finish adjustments.
Immutable variables are evaluated once at construction time and their value is copied to all the places in the code where they are accessed. So it has nothing to do with storage, we are solving this problem by overriding these methods which use "immutable __self" variable. |
AnnaShaleva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
|
@roman-khimov, @txhsl, @nicolegys, @ZhangTao1596 ready for the final review&merge. |
|
We have not yet added the function of burning fees. We can send part of fees to an empty address in the governance contract to burn and configure this burning ratio in the policy contract. Issue opened in #163. |
AnnaShaleva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
mialbu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor documentation and consistency-related comments.
This PR is a code implementation of #2, #3, #5. Close #2, Close #3, Close #5.
This PR is going to add the
Governancecontract to manage consensus list,Policycontract to manage policy parameters. We will have the first Phase of consensus in genesis block and the users can vote for new Phases with GAS inGovernancecontract. TheGovRewardcontract will keep the reward GAS for governance voters. For governance requirements, please refer to https://docs.google.com/document/d/11iDJGpCDNrKmPQN8TOhmEqBlWZAOstH15j3Afc2xoQo/edit#heading=h.idvp9uir3xt8.The
GovernanceVotecontract is an abstract contract for Policy and other contracts (likeGovProxyAdmin) who need a 1/2 consensus vote to execute some function.We will use upgradable contracts for Governance, Policy and GovReward,
ERC1967Proxyis used as proxy andGovProxyAdminis used as the admin of upgrade.For the implemention of #5, we will need following contracts in genesis alloc: