cosmos-sdk icon indicating copy to clipboard operation
cosmos-sdk copied to clipboard

feat: implement parse method for Int,Dec,Coin

Open atheeshp opened this issue 3 years ago • 5 comments

Description

Closes: #13153


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)

atheeshp avatar Oct 31 '22 05:10 atheeshp

Codecov Report

Merging #13696 (688c1ff) into main (2739f83) will increase coverage by 0.71%. The diff coverage is 61.79%.

:exclamation: Current head 688c1ff differs from pull request most recent head 2827dcd. Consider uploading reports for the commit 2827dcd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #13696      +/-   ##
==========================================
+ Coverage   56.25%   56.97%   +0.71%     
==========================================
  Files         667      710      +43     
  Lines       56576    60087    +3511     
==========================================
+ Hits        31829    34233    +2404     
- Misses      22165    22954     +789     
- Partials     2582     2900     +318     
Impacted Files Coverage Δ
tx/textual/valuerenderer/dec.go 50.00% <42.85%> (ø)
tx/textual/valuerenderer/int.go 46.29% <44.68%> (ø)
tx/textual/valuerenderer/coins.go 71.53% <69.14%> (ø)
tx/textual/valuerenderer/valuerenderer.go 72.41% <92.30%> (ø)
core/coins/format.go 84.48% <100.00%> (ø)
x/group/module/module.go 48.05% <0.00%> (-0.10%) :arrow_down:
server/mock/tx.go 53.33% <0.00%> (ø)
x/auth/types/codec.go 100.00% <0.00%> (ø)
x/group/keeper/migrations.go
x/group/migrations/v2/migrate.go
... and 51 more

codecov[bot] avatar Nov 08 '22 10:11 codecov[bot]

I enabled auto merge, @atheeshp can you fix the conflicts?

amaury1093 avatar Nov 23 '22 18:11 amaury1093

@amaurym resolved conflicts, can you take final look & enable auto-merge?

atheeshp avatar Nov 24 '22 16:11 atheeshp

@odeke-em Are you able to make another round of review, given https://github.com/cosmos/cosmos-sdk/pull/13696#discussion_r1032848163?

amaury1093 avatar Dec 01 '22 17:12 amaury1093

[Cosmos SDK - Tx] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Dec 02 '22 12:12 sonarqubecloud[bot]

[Cosmos SDK Core] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Dec 02 '22 12:12 sonarqubecloud[bot]

[Cosmos SDK] SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Dec 02 '22 13:12 sonarqubecloud[bot]

@odeke-em Are you able to make another round of review, given https://github.com/cosmos/cosmos-sdk/pull/13696#discussion_r1032848163?

Some of my review comments weren't addressed but I'd say from a performance and security perspective we shall need to ensure validity of messages regardless of lightweight or not, the tests fail with inputs :-)

odeke-em avatar Dec 02 '22 19:12 odeke-em