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 Sell ORM #873

Merged
merged 15 commits into from
Mar 11, 2022
Merged

Conversation

technicallyty
Copy link
Contributor

@technicallyty technicallyty commented Mar 10, 2022

Description

  • migrates Sell function to ORM
  • refactors some general utils out of the core package
  • uncomments iface guard in core keeper

ref: #856

Closes: #696


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)

@technicallyty technicallyty marked this pull request as ready for review March 10, 2022 19:14
@codecov
Copy link

codecov bot commented Mar 10, 2022

Codecov Report

Merging #873 (531376d) into master (619eb61) will decrease coverage by 5.62%.
The diff coverage is 77.38%.

❗ Current head 531376d differs from pull request most recent head 98765f8. Consider uploading reports for the commit 98765f8 to get more accurate results

@@            Coverage Diff             @@
##           master     #873      +/-   ##
==========================================
- Coverage   33.19%   27.56%   -5.63%     
==========================================
  Files         185      195      +10     
  Lines       57325    72274   +14949     
==========================================
+ Hits        19027    19924     +897     
- Misses      36682    50598   +13916     
- Partials     1616     1752     +136     
Flag Coverage Δ
experimental-codecov 27.54% <77.38%> (-5.62%) ⬇️
stable-codecov 24.17% <77.38%> (-4.96%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

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

Nice work! Mostly minor suggestions but before approving, I think we should comment out the allowed denom check, which depends on v0.46. I think it would be better to exclude this check for now and link a todo to the existing issue #624. I think we should at least wait to have this implemented until a beta is released for Hambach.

x/ecocredit/server/core/cancel.go Outdated Show resolved Hide resolved
x/ecocredit/server/core/create_batch.go Outdated Show resolved Hide resolved
x/ecocredit/server/core/create_class.go Outdated Show resolved Hide resolved
x/ecocredit/server/core/keeper.go Outdated Show resolved Hide resolved
x/ecocredit/server/core/retire.go Outdated Show resolved Hide resolved
x/ecocredit/server/marketplace/sell_test.go Outdated Show resolved Hide resolved
x/ecocredit/server/marketplace/sell_test.go Show resolved Hide resolved
x/ecocredit/server/marketplace/sell.go Outdated Show resolved Hide resolved
x/ecocredit/server/marketplace/sell_test.go Show resolved Hide resolved
x/ecocredit/server/marketplace/sell_test.go Outdated Show resolved Hide resolved
Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. Looks good.

x/ecocredit/server/marketplace/keeper_test.go Outdated Show resolved Hide resolved
@ryanchristo
Copy link
Member

    sell_test.go:100: assertion failed: expected an error, got nil: C01-20200101-20200201-001
    controller.go:137: missing call(s) to *mocks.MockParamKeeper.GetParamSet(is anything, is anything) /home/runner/work/regen-ledger/regen-ledger/x/ecocredit/server/marketplace/sell_test.go:88
    controller.go:137: aborting test due to missing call(s)
--- FAIL: TestSell_Invalid (0.02s)

@technicallyty
Copy link
Contributor Author

technicallyty commented Mar 11, 2022

    sell_test.go:100: assertion failed: expected an error, got nil: C01-20200101-20200201-001
    controller.go:137: missing call(s) to *mocks.MockParamKeeper.GetParamSet(is anything, is anything) /home/runner/work/regen-ledger/regen-ledger/x/ecocredit/server/marketplace/sell_test.go:88
    controller.go:137: aborting test due to missing call(s)
--- FAIL: TestSell_Invalid (0.02s)

had to remove an outdated test - market not found errors should create a market instead and continue executing

@technicallyty technicallyty merged commit e52f1da into master Mar 11, 2022
@technicallyty technicallyty deleted the ty/856-marketplace_ORM branch March 11, 2022 22:43
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.

x/ecocredit: migrate ecocredit storage model to ORM
3 participants