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

Add command line interface #180

Merged
merged 10 commits into from
Feb 14, 2022
Merged

Add command line interface #180

merged 10 commits into from
Feb 14, 2022

Conversation

jaybxyz
Copy link
Contributor

@jaybxyz jaybxyz commented Feb 14, 2022

Description

closes: #161

Tasks

  • Add query and tx command line interface
  • Add gRPC test cases
  • Add KeeperTestSuite and helper functions to write test codes easily
  • Move msg server logic to claim.go
  • Add ClaimableCoins field to handle calculation logic easily and it becomes more intuitive
  • Add emit events
  • Update docs

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Appropriate labels applied
  • Targeted PR against correct branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@jaybxyz jaybxyz self-assigned this Feb 14, 2022
@jaybxyz jaybxyz added x/claim enhancement New feature or request labels Feb 14, 2022
@jaybxyz jaybxyz marked this pull request as ready for review February 14, 2022 07:48
@jaybxyz jaybxyz merged commit f0e4959 into main Feb 14, 2022
Comment on lines +59 to +62
divisor := sdk.NewDec(notClaimedActions)
amt, _ := sdk.NewDecCoinsFromCoins(record.ClaimableCoins...).QuoDecTruncate(divisor).TruncateDecimal()
record.ClaimableCoins = record.ClaimableCoins.Sub(amt)
k.SetClaimRecord(ctx, record)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should send all remaining ClaimableCoins when notClaimedActions == 1(claiming the last coins).

@hallazzang hallazzang deleted the 161-add-cli-command branch February 28, 2022 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request x/claim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement command line interfaces
2 participants