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(sponsorship): add more details to sponsorship events #798

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

aliXsed
Copy link
Contributor

@aliXsed aliXsed commented Nov 14, 2023

The extra detail in the events is not going to impact the cost of the corresponding extrinsics sensibly. However they help with the performance of the indexers such as Subquery which follow the events and are better off just doing that and not needing to query a value from a node.

  • @Douglasacost to review the extra details for the events and check if they are enough
  • Benchmark the pallet again so we can confirm the extrinsic costs would be minimally different.

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Attention: 44 lines in your changes are missing coverage. Please review.

Comparison is base (90fcc7b) 73.81% compared to head (da1f47c) 73.98%.
Report is 1 commits behind head on master.

Files Patch % Lines
pallets/sponsorship/src/weights.rs 8.33% 44 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #798      +/-   ##
==========================================
+ Coverage   73.81%   73.98%   +0.16%     
==========================================
  Files          47       47              
  Lines        9017     9074      +57     
==========================================
+ Hits         6656     6713      +57     
  Misses       2361     2361              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@Douglasacost Douglasacost left a comment

Choose a reason for hiding this comment

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

LGTM!

users: Vec<T::AccountId>,
fee_quota: BalanceOf<T>,
reserve_quota: BalanceOf<T>,
},
/// Event emitted when a sponsor_me call has been successful indicating the reserved amount
Sponsored { paid: BalanceOf<T>, repaid: BalanceOf<T> },

Choose a reason for hiding this comment

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

What repaid means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Douglasacost paid is how much was borrowed from the sponsor at the beginning of this call and repaid means how much debt was payed off from the user's account at the end of this call.

@aliXsed aliXsed merged commit 77e6009 into master Nov 15, 2023
6 of 7 checks passed
@aliXsed aliXsed deleted the aliX/sponsorship-events branch November 15, 2023 01:07
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.

2 participants