-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add tipping into treasury #4480
Conversation
|
| } | ||
| fn contains(t: &T) -> bool { Self::sorted_members().binary_search(t).is_ok() } | ||
|
|
||
| impl<V: PartialEq, T: Get<V>> Contains<V> for T { |
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.
this won't work if we also have specialisation for a module as we do now with the treasury module, hence the need for these changes and ord_parameter_types.
shawntabrizi
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.
Some questions and nit feedback, but this looks good to me.
Very wholesome feature :)
shawntabrizi
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.
Oops, actually you forgot to include base weight values for the new extrinsics.
Co-Authored-By: Shawn Tabrizi <[email protected]>
Co-Authored-By: Shawn Tabrizi <[email protected]>
Co-Authored-By: Shawn Tabrizi <[email protected]>
Co-Authored-By: Shawn Tabrizi <[email protected]>
| if Self::insert_tip_and_check_closing(&mut tip, tipper, tip_value) { | ||
| Self::deposit_event(RawEvent::TipClosing(hash.clone())); | ||
| } | ||
| Tips::<T>::insert(&hash, tip); |
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.
Sorry for comment with this historical PR, but I want to ask were there any special considerations without emitting a Tip event here? Just to avoid too many events?
Actually it's a little troublesome without this event to handle off-chain business.
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 think we can emit some events if needed, it shouldn't be too may events AFAICT. You can open an issue or PR
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 think we can emit some events if needed, it shouldn't be too may events AFAICT. You can open an issue or PR
I see. Thanks.
Closes #4477
TODO: