Skip to content
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

feat: allow renounce of delegation #6

Closed
wants to merge 3 commits into from
Closed

Conversation

sakulstra
Copy link
Collaborator

No description provided.

@sakulstra sakulstra requested a review from kyzia551 August 30, 2022 13:32
kyzia551
kyzia551 previously approved these changes Aug 30, 2022
@eboadom
Copy link
Contributor

eboadom commented Aug 30, 2022

I think renouncing functions should be symmetrical with giving delegation, so we need a renounceDelegation() renouncing both I think

@kyzia551
Copy link
Contributor

kyzia551 commented Aug 30, 2022 via email

@sakulstra sakulstra requested a review from kyzia551 August 31, 2022 11:07
_balances[delegator],
GovernancePowerType.PROPOSITION
);
require(votingDelegatee == msg.sender || propositionDelegatee == msg.sender, 'NO_DELEGATION');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eboadom "or" or "and", interesting question

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AND of course. OR is a bug

Copy link
Collaborator Author

@sakulstra sakulstra Aug 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why though?
I perceived this to be the lazy function a la renounce Whatever, why would i fail if i only had one delegation?
Seems like a waste of gas to revert as it's clear that the user wanted to renounce.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that is another way of seeing it yes. I think if documented, makes sense, don't see where it could be a problem to have OR behaviour

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge then

@eboadom
Copy link
Contributor

eboadom commented Aug 31, 2022

Agree Best regards, Andrei

Quite polite 😄

@kyzia551
Copy link
Contributor

kyzia551 commented Aug 31, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants