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 ecocredit projects msg & query server implementations #647

Merged
merged 48 commits into from
Jan 3, 2022

Conversation

aleem1314
Copy link
Contributor

@aleem1314 aleem1314 commented Nov 18, 2021

Description

Closes: #646


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)

@aleem1314 aleem1314 changed the title feat!: add ecocredit projects msg & query server implementations feat(x/ecocredit)!: add ecocredit projects msg & query server implementations Nov 25, 2021
@codecov
Copy link

codecov bot commented Nov 25, 2021

Codecov Report

Merging #647 (816f1d1) into master (55d39dc) will decrease coverage by 0.47%.
The diff coverage is 64.20%.

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

@@            Coverage Diff             @@
##           master     #647      +/-   ##
==========================================
- Coverage   74.39%   73.91%   -0.48%     
==========================================
  Files         109      110       +1     
  Lines       16539    17064     +525     
==========================================
+ Hits        12304    12613     +309     
- Misses       3404     3578     +174     
- Partials      831      873      +42     
Flag Coverage Δ
experimental-codecov 74.03% <64.20%> (-0.49%) ⬇️
stable-codecov 66.52% <64.20%> (-0.31%) ⬇️

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

.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
@aleem1314 aleem1314 marked this pull request as ready for review November 25, 2021 13:09
@technicallyty
Copy link
Contributor

lgtm, just pending - #647 (comment)

@robert-zaremba robert-zaremba self-assigned this Dec 9, 2021
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.

Unblocking, but I would like to see:

x/ecocredit/client/tx.go Show resolved Hide resolved
x/ecocredit/client/tx.go Show resolved Hide resolved
@@ -549,3 +548,140 @@ func (m *MsgAllowAskDenom) GetSigners() []sdk.AccAddress {
addr, _ := sdk.AccAddressFromBech32(m.RootAddress)
return []sdk.AccAddress{addr}
}

// Route implements the LegacyMsg interface.
func (m MsgCreateProject) Route() string { return sdk.MsgTypeURL(&m) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we don't need to implement it. Let's remove. Same for Type.

x/ecocredit/server/msg_server.go Show resolved Hide resolved
BatchDenom: string(batchDenom),
Issuer: req.Issuer,
TotalAmount: totalSupplyStr,
StartDate: req.StartDate.Format("2006-01-02"),
EndDate: req.EndDate.Format("2006-01-02"),
ProjectLocation: req.ProjectLocation,
ProjectLocation: projectInfo.ProjectLocation,
Copy link
Collaborator

Choose a reason for hiding this comment

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

ping

@aleem1314
Copy link
Contributor Author

  • Remove legacy Msg methods (Route, Type, GetSignBytes) - they are not needed. Let's make the code less boilerplate.

If we remove legacy Msg methods, Ledger users won't be able to sign txns #469.

@clevinson clevinson dismissed robert-zaremba’s stale review December 16, 2021 16:12

Robert said he was unblocking - so dismissing

@ryanchristo
Copy link
Member

cc @robert-zaremba @technicallyty

@technicallyty
Copy link
Contributor

should we add a test for the project ID generator ?

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.

LGTM just some final nits

x/ecocredit/client/tx.go Outdated Show resolved Hide resolved
x/ecocredit/project.go Outdated Show resolved Hide resolved
x/ecocredit/server/server_test.go Outdated Show resolved Hide resolved
aleem1314 and others added 4 commits January 3, 2022 22:34
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
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.

Add projects to credit data model (msg & query server implementations)
6 participants