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): add BurnRegen method #2107

Merged
merged 8 commits into from
Jan 29, 2024
Merged

feat(x/ecocredit): add BurnRegen method #2107

merged 8 commits into from
Jan 29, 2024

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Dec 12, 2023

Description

This PR adds a BurnRegen method to the ecocredit module which allows a user to burn REGEN from their balance with an optional burn reason which can be used by clients to associate the burn with specific activities.


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 changed the title feat(x/ecocredit): add MsgBurnRegen feat(x/ecocredit): add BurnRegen Msg Dec 12, 2023
@aaronc aaronc changed the title feat(x/ecocredit): add BurnRegen Msg feat(x/ecocredit): add BurnRegen method Dec 12, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

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

Comparison is base (0936200) 73.26% compared to head (f186eea) 73.21%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2107      +/-   ##
==========================================
- Coverage   73.26%   73.21%   -0.06%     
==========================================
  Files         232      234       +2     
  Lines       13748    13801      +53     
==========================================
+ Hits        10073    10104      +31     
- Misses       2941     2958      +17     
- Partials      734      739       +5     
Files Coverage Δ
x/ecocredit/base/types/v1/msg_burn_regen.go 68.18% <68.18%> (ø)
x/ecocredit/base/keeper/msg_burn_regen.go 51.61% <51.61%> (ø)

@aaronc aaronc marked this pull request as ready for review December 12, 2023 22:02
@JeancarloBarrios
Copy link
Member

It looks good; I was just wondering. Does it make sense that it is its own cosmos SDK x module? that could eventually evolve into a fee management module? However, if so, it makes sense to do it after and migrate it to it then.

@aaronc
Copy link
Member Author

aaronc commented Dec 15, 2023

Thanks for the review @JeancarloBarrios. I agree that a standalone module would make more sense. But also, there's a fair amount of overhead in creating a new module, so I think we will get this live on chain sooner by putting it in x/ecocredit. Also, the other burning functionality we've discussed would be native to x/ecocredit so it's not totally out of place.

@aaronc
Copy link
Member Author

aaronc commented Jan 7, 2024

It would be great to get one more review here if anyone has time.

Copy link
Member

@blushi blushi left a comment

Choose a reason for hiding this comment

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

LGTM

@aaronc aaronc enabled auto-merge (squash) January 25, 2024 23:59
@aaronc aaronc disabled auto-merge January 29, 2024 16:45
@aaronc aaronc enabled auto-merge (squash) January 29, 2024 17:00
@@ -5,7 +5,6 @@ linters:
disable-all: true
enable:
- bodyclose
- depguard
Copy link
Member Author

Choose a reason for hiding this comment

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

This linter was causing CI errors but we never configured it and probably it just got enabled with a default blocking rule in #2148. cc @robert-zaremba

@aaronc aaronc merged commit 35b8b47 into main Jan 29, 2024
26 checks passed
@aaronc aaronc deleted the aaronc/msgburn2 branch January 29, 2024 17:47
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.

3 participants