-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
I think renouncing functions should be symmetrical with giving delegation, so we need a |
Agree
Best regards,
Andrei
…On Tue, 30 Aug 2022, 16:48 Ernesto Boado, ***@***.***> wrote:
I think renouncing functions should be symmetrical with giving delegation,
so we need a renounceDelegation() renouncing both I think
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFXTWV5667MQUBA7RQTO6TV3YNLVANCNFSM6AAAAAAQANFDDE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
_balances[delegator], | ||
GovernancePowerType.PROPOSITION | ||
); | ||
require(votingDelegatee == msg.sender || propositionDelegatee == msg.sender, 'NO_DELEGATION'); |
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.
@eboadom "or" or "and", interesting question
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.
AND of course. OR is a bug
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.
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.
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.
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
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.
Let's merge then
Quite polite 😄 |
It sounds legit, because the power of a guy will be renounced, even if he
delegated you half
…On Wed, 31 Aug 2022, 19:29 Lukas, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/AaveTokenV3.sol
<#6 (comment)>:
> _delegateByType(delegator, delegator, delegationType);
}
+
+ /// @inheritdoc IGovernancePowerDelegationToken
+ function renounceDelegator(address delegator) external override {
+ address votingDelegatee = _getDelegateeByType(
+ delegator,
+ _balances[delegator],
+ GovernancePowerType.VOTING
+ );
+ address propositionDelegatee = _getDelegateeByType(
+ delegator,
+ _balances[delegator],
+ GovernancePowerType.PROPOSITION
+ );
+ require(votingDelegatee == msg.sender || propositionDelegatee == msg.sender, 'NO_DELEGATION');
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 as it's clear that the user wanted to renounce.
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFXTWWAHPFLBWAW4H53TZ3V36I6DANCNFSM6AAAAAAQANFDDE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
No description provided.