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

refactor(x/ecocredit): migrate abci to module and clean up module #1452

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

ryanchristo
Copy link
Member

Description

Closes: n/a

This pull request migrates the abci method to the module package per sdk building module guidelines, removes the deprecated RegisterRESTRoutes method, and reorganizes the module so that related methods are grouped together.


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)

@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

Merging #1452 (de48b66) into main (4ef8001) will decrease coverage by 0.02%.
The diff coverage is 53.03%.

@@            Coverage Diff             @@
##             main    #1452      +/-   ##
==========================================
- Coverage   78.48%   78.45%   -0.03%     
==========================================
  Files         238      238              
  Lines       18439    18448       +9     
==========================================
+ Hits        14471    14473       +2     
- Misses       3126     3130       +4     
- Partials      842      845       +3     
Impacted Files Coverage Δ
x/ecocredit/base/keeper/keeper.go 100.00% <ø> (ø)
x/ecocredit/basket/keeper/keeper.go 100.00% <ø> (ø)
x/ecocredit/marketplace/keeper/keeper.go 100.00% <ø> (ø)
x/ecocredit/module/module.go 54.36% <50.00%> (-2.07%) ⬇️
app/app.go 92.68% <100.00%> (ø)
x/ecocredit/module/abci.go 57.14% <100.00%> (ø)
x/ecocredit/server/tests/utils.go 100.00% <100.00%> (ø)

@ryanchristo ryanchristo marked this pull request as ready for review August 31, 2022 21:00
@ryanchristo ryanchristo requested a review from a team August 31, 2022 21:00
Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

LGMT - preapproving w/ small nits

x/ecocredit/module/module.go Show resolved Hide resolved
x/ecocredit/module/module.go Show resolved Hide resolved
CHANGELOG.md Outdated
@@ -65,11 +65,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1337](https://github.com/regen-network/regen-ledger/pull/1337) The `AddCreditType` proposal handler has been removed.
- [#1342](https://github.com/regen-network/regen-ledger/pull/1342) The `NewKeeper` method in `ecocredit/marketplace` requires an `authority` address.
- [#1342](https://github.com/regen-network/regen-ledger/pull/1342) The `AllowedDenom` proposal handler has been removed.

- [#1452](https://github.com/regen-network/regen-ledger/pull/1452) The `NewModule` method in `ecocredit/module` requires an `authority` address and store `key`.
Copy link
Contributor

Choose a reason for hiding this comment

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

i think it might be better to describe what the breaking change was (position of args changed), i was confused at first thinking "i thought we already required those things" 🤔

Copy link
Member Author

@ryanchristo ryanchristo Sep 1, 2022

Choose a reason for hiding this comment

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

These are new since the last release and not recorded anywhere else in the change log.

Copy link
Member Author

Choose a reason for hiding this comment

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

Was not sure whether I should retroactively fix or just add a new entry and went with the latter.

Copy link
Contributor

Choose a reason for hiding this comment

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

works for me 👍🏻

Copy link
Member Author

Choose a reason for hiding this comment

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

I was being lazy. I updated the changelog. No entry for changing the order necessary though if these are new. Added the two pull requests for when they were added. 👍

@ryanchristo ryanchristo merged commit e484d6e into main Sep 1, 2022
@ryanchristo ryanchristo deleted the ryan/clean-up-module branch September 1, 2022 01:08
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