Skip to content

fix(x/rewards): create block rewards for flat fees#338

Merged
spoo-bar merged 15 commits into
mainfrom
spoorthi/contarct-premium-flat-fee-rewards-record
Apr 20, 2023
Merged

fix(x/rewards): create block rewards for flat fees#338
spoo-bar merged 15 commits into
mainfrom
spoorthi/contarct-premium-flat-fee-rewards-record

Conversation

@spoo-bar

@spoo-bar spoo-bar commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

Ref: #336

  • Modified MinFeeDecorator such that when a contract is found with flatfees configured, the relevant rewards records are created
  • Modified DeductFeeDecorator such that when a contract is found with flatfees configured, the relevant amount is sent from the sender's acc to the rewards collector account
  • Some refactor of x/rewards antehandlers in general with moving common stuff to ante_utils
  • Added TestRewardsFlatFees to e2e rewards_tests which checks that post a successful tx completion, the relevant records for contract premium are created.

@codecov

codecov Bot commented Apr 13, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 56.92% and project coverage change: -0.32 ⚠️

Comparison is base (1bb75b4) 69.63% compared to head (a6cd05d) 69.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
- Coverage   69.63%   69.32%   -0.32%     
==========================================
  Files          63       64       +1     
  Lines        3777     3804      +27     
==========================================
+ Hits         2630     2637       +7     
- Misses       1070     1088      +18     
- Partials       77       79       +2     
Impacted Files Coverage Δ
x/rewards/keeper/flat_fee.go 76.47% <0.00%> (-23.53%) ⬇️
x/rewards/ante/fee_deduction.go 56.81% <41.17%> (-4.23%) ⬇️
x/rewards/ante/ante_utils.go 69.69% <69.69%> (ø)
app/ante.go 58.82% <100.00%> (ø)
x/rewards/ante/min_cons_fee.go 78.57% <100.00%> (+0.95%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@spoo-bar spoo-bar changed the title fix: create block rewards for flat fees fix(x/rewards): create block rewards for flat fees Apr 18, 2023
@spoo-bar spoo-bar marked this pull request as ready for review April 18, 2023 10:01
@spoo-bar spoo-bar requested a review from fdymylja April 18, 2023 10:01
@spoo-bar spoo-bar merged commit 5c0b2a9 into main Apr 20, 2023
@spoo-bar spoo-bar deleted the spoorthi/contarct-premium-flat-fee-rewards-record branch April 20, 2023 10:03
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