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

Send full custom msg fee to recipient instead of 50/50 split with module. #1267

Merged
merged 8 commits into from
Dec 16, 2022

Conversation

arnabmitra
Copy link
Contributor

@arnabmitra arnabmitra commented Dec 15, 2022

this PR implements #1263 …per request, still keeping bips as an option but for now it all goes to the recipient, see comment on AssessCustomMsgFeeBips

// AssessCustomMsgFeeBips is the bips the recipient will get
// This should be a message level data (present in TypeAssessCustomMsgFee = assess_custom_msg_fee) i think so that it can be defined by the smart contract writer
// or at the very least it can be a module param.
// for now i am hard coding it to avoid breaking any clients and because of this ticket https://github.com/provenance-io/provenance/issues/1263
AssessCustomMsgFeeBips = 10_000

created follow up issue if we want to still have some kind of split in the future #1268

Description

closes: #1263


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

…or now it all goes to the recipient, see comment // AssessCustomMsgFeeBips is the bips the recipient will get

	// This should be a message level data (present in TypeAssessCustomMsgFee = assess_custom_msg_fee) i think so that it can be defined by the smart contract writer
	// or at the very least it can be a module param.
	// for now i am hard coding it to avoid breaking any clients and because of this ticket #1263
	AssessCustomMsgFeeBips = 10_000
@arnabmitra arnabmitra changed the title https://github.com/provenance-io/provenance/issues/1263 implement as … https://github.com/provenance-io/provenance/issues/1263 Dec 15, 2022
@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #1267 (2f2349d) into main (6354efc) will increase coverage by 0.00%.
The diff coverage is 69.23%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1267   +/-   ##
=======================================
  Coverage   58.46%   58.47%           
=======================================
  Files         206      206           
  Lines       25264    25274   +10     
=======================================
+ Hits        14771    14779    +8     
- Misses       9398     9400    +2     
  Partials     1095     1095           
Impacted Files Coverage Δ
x/msgfees/types/msgs.go 63.63% <ø> (ø)
x/msgfees/types/fee.go 48.71% <55.55%> (+4.96%) ⬆️
internal/handlers/msg_service_router.go 77.86% <100.00%> (+0.55%) ⬆️

@arnabmitra arnabmitra marked this pull request as ready for review December 15, 2022 17:11
@arnabmitra arnabmitra requested a review from a team as a code owner December 15, 2022 17:11
derekadams
derekadams previously approved these changes Dec 15, 2022
Copy link
Contributor

@derekadams derekadams left a comment

Choose a reason for hiding this comment

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

LGTM

x/msgfees/types/fee.go Outdated Show resolved Hide resolved
SpicyLemon
SpicyLemon previously approved these changes Dec 15, 2022
@SpicyLemon SpicyLemon changed the title https://github.com/provenance-io/provenance/issues/1263 Send full custom msg fee to recipient instead of 50/50 split with module. Dec 15, 2022
Copy link
Contributor

@derekadams derekadams left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@iramiller iramiller left a comment

Choose a reason for hiding this comment

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

nice... I like the 10_000bips short circuit flow.

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.

MsgFees Module 50/50 Fee Split on MsgAssessCustomMsgFeeRequest Removal
5 participants