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

[ENG-219] bump erc20 test coverage #546

Merged
merged 12 commits into from
May 3, 2022
Merged

Conversation

ramacarlucho
Copy link
Contributor

Description

Add test coverage for the erc20 module

Closes: #XXX


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.

PR review checkboxes:

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • included the correct type prefix in the PR title
  • targeted the correct branch (see PR Targeting)
  • provided a link in the PR description to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all required CI checks have passed

Code maintenance:

I have...

  • written unit and integration tests
  • added relevant godoc and code comments.
  • updated relevant documentation (docs/) or specification (x/<module>/spec/)

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 all author checklist items have been addressed
  • confirmed that this PR does not change production code

@linear
Copy link

linear bot commented May 3, 2022

@@ -58,6 +58,7 @@ func (k Keeper) RegisterCoin(ctx sdk.Context, coinMetadata banktypes.Metadata) (

// verify if the metadata matches the existing one, if not it sets it to the store
func (k Keeper) verifyMetadata(ctx sdk.Context, coinMetadata banktypes.Metadata) error {
// Metadata cant be invalid since its checked that bank supply is available
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this comment, can you rephrase it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comment was wrong.
Deleted the comment and added coinMetadata.Validate() check

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't the metadata validated already in the proposal types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, thats correct. Ill delete this check since its unnecessary

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #546 (93137a1) into main (21a717e) will increase coverage by 1.60%.
The diff coverage is 100.00%.

❗ Current head 93137a1 differs from pull request most recent head d4fadc8. Consider uploading reports for the commit d4fadc8 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
+ Coverage   81.57%   83.18%   +1.60%     
==========================================
  Files         115      115              
  Lines        6318     6334      +16     
==========================================
+ Hits         5154     5269     +115     
+ Misses       1009      936      -73     
+ Partials      155      129      -26     
Impacted Files Coverage Δ
x/erc20/keeper/msg_server.go 97.91% <100.00%> (+19.97%) ⬆️
x/erc20/keeper/proposals.go 93.15% <0.00%> (+5.47%) ⬆️
x/erc20/keeper/evm.go 92.15% <0.00%> (+24.18%) ⬆️

@ramacarlucho ramacarlucho marked this pull request as ready for review May 3, 2022 20:18
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK 👌

x/erc20/keeper/evm_test.go Outdated Show resolved Hide resolved
x/erc20/keeper/evm_test.go Outdated Show resolved Hide resolved
@fedekunze fedekunze merged commit f250911 into main May 3, 2022
@fedekunze fedekunze deleted the rama/erc20_test_coverage branch May 3, 2022 20:50
loredanacirstea added a commit to loredanacirstea/evmos that referenced this pull request May 6, 2022
* loredana/ENG-214-add-epoch-types: (40 commits)
  Update evmos v3 -> v4 after latest changes
  Add year and hour epochs
  Update evmos v3 -> v4 after latest changes
  uncomment check
  feat: Inbound / outbound peers & default seeds (evmos#541)
  upgrade: Update Evmos go.mod version `v3` -> `v4` (evmos#557)
  Add change log
  Add migration logic for epoch change
  Fix epochs unit tests
  Revert to ascending order
  Store epoch information by duration and by identifier
  audit(erc20): add types tests and update comments (evmos#550)
  [ENG-219] bump erc20 test coverage (evmos#546)
  audit(erc20): state machine audit (evmos#547)
  audit(erc20): Changes from api audit (evmos#544)
  imp: update default min-gas-prices (evmos#543)
  imp: use constants for epochs IDs (evmos#539)
  fix: upgrade client router key (evmos#537)
  impr(`inflation`): Rename total supply endpoint (evmos#536)
  fix: `buf protoc` was moved to `buf alpha protoc` (evmos#462)
  ...
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.

None yet

2 participants