-
Notifications
You must be signed in to change notification settings - Fork 823
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
Rewards beneficiary #7609
base: bko-rewards
Are you sure you want to change the base?
Rewards beneficiary #7609
Conversation
All GitHub workflows were cancelled due to failure one of the required jobs. |
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.
Just left a comment. Otherwise LGTM
reward_kind: RewardsAccountParams<LaneId>, | ||
reward: RewardBalance, | ||
alternative_beneficiary: Option<Self::AlternativeBeneficiary>, | ||
beneficiary: Either<Relayer, Self::AlternativeBeneficiary>, |
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.
I don't know if Either
is needed anymore. We can just do beneficiary: Self::AlternativeBeneficiary
. I think it would cover all the use cases that we have, right ?
Also I would rename AlternativeBeneficiary
to Beneficiary
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.
but how would we then set https://github.com/paritytech/polkadot-sdk/pull/7609/files#diff-fe0ccabcf75160287fb96b1e0b334c0e71cf3a527a13e7d452e27814ca95f853R57 type AlternativeBeneficiary = VersionedLocation;
?
I cannot use Either
for extrinsics, so then I will have a problem here, where I need to set relayer as T::AccountId
in one case:
https://github.com/paritytech/polkadot-sdk/pull/7609/files#diff-1efb72aae678f442cc1679443e49946337f9f5e0b34044756e74864ef98bd8e9R116
and another case: as VersionedLocation
:
https://github.com/paritytech/polkadot-sdk/pull/7609/files#diff-1efb72aae678f442cc1679443e49946337f9f5e0b34044756e74864ef98bd8e9R232
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.
@serban300 or feel free to update this PR directly :)
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, sorry, I see the problem. I have to experiment a bit.
Apart from that #7492 looks good. I'll approve as soon as we sort this out.
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.
Yes, you're right, I think I got it, I will do type Beneficiary
and at the end it will be just enum(AccountId, VersionedLocation), and we dont need neither Either nor Option
No description provided.