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(x/ecocredit/marketplace): marketplace fee API #2151

Merged
merged 17 commits into from
Feb 5, 2024

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Jan 30, 2024

Description

Defines the protobuf API for marketplace fees.

In this model there are buyer a seller percentage fees for every marketplace sale. If the buyer fee is 5% and the seller fee is 5% and 100tokens of credits are sold, the buyer pays an extra 5tokens totaling a payment of 105tokens and the seller receives 95tokens. 10tokens would be deposited in the fee pool. If the denom is uregen, then the 10uregen get burned.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@aaronc aaronc marked this pull request as ready for review January 30, 2024 17:08
@aaronc aaronc changed the title feat(x/ecocredit/marketplace): add marketplace fee API feat(x/ecocredit/marketplace): marketplace fee API Jan 30, 2024
Copy link
Member

@JeancarloBarrios JeancarloBarrios left a comment

Choose a reason for hiding this comment

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

I think to start with is perfect!

Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

added comment to clarify a unit

proto/regen/ecocredit/marketplace/v1/tx.proto Outdated Show resolved Hide resolved
proto/regen/ecocredit/marketplace/v1/tx.proto Outdated Show resolved Hide resolved
proto/regen/ecocredit/marketplace/v1/tx.proto Show resolved Hide resolved
@aaronc
Copy link
Member Author

aaronc commented Feb 5, 2024

Thanks @robert-zaremba. Addressed your comments

Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

utACK

@aaronc aaronc enabled auto-merge (squash) February 5, 2024 15:53
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

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

Comparison is base (1636a79) 73.19% compared to head (c9622e3) 73.11%.

❗ Current head c9622e3 differs from pull request most recent head e416771. Consider uploading reports for the commit e416771 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2151      +/-   ##
==========================================
- Coverage   73.19%   73.11%   -0.08%     
==========================================
  Files         234      236       +2     
  Lines       13802    13820      +18     
==========================================
+ Hits        10102    10105       +3     
- Misses       2960     2976      +16     
+ Partials      740      739       -1     
Files Coverage Δ
...redit/marketplace/keeper/msg_gov_set_fee_params.go 0.00% <0.00%> (ø)
...dit/marketplace/types/v1/msg_gov_set_fee_params.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@aaronc aaronc merged commit 45044a3 into main Feb 5, 2024
27 checks passed
@aaronc aaronc deleted the aaronc/marketplace-fees branch February 5, 2024 16:26
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.

None yet

3 participants