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: make helper function for adding accounts to genesis state #13298

Merged
merged 27 commits into from
Sep 23, 2022

Conversation

likhita-809
Copy link
Contributor

@likhita-809 likhita-809 commented Sep 15, 2022

Description

Closes: #12091
ref: #13085


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)

@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #13298 (723f7e4) into main (4fe7797) will decrease coverage by 1.34%.
The diff coverage is 28.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #13298      +/-   ##
==========================================
- Coverage   55.87%   54.53%   -1.35%     
==========================================
  Files         646      665      +19     
  Lines       54895    57343    +2448     
==========================================
+ Hits        30675    31271     +596     
- Misses      21762    23556    +1794     
- Partials     2458     2516      +58     
Impacted Files Coverage Δ
baseapp/grpcrouter.go 90.00% <ø> (ø)
baseapp/grpcrouter_helpers.go 25.00% <ø> (ø)
baseapp/grpcserver.go 1.72% <ø> (ø)
baseapp/msg_service_router.go 85.29% <ø> (+4.41%) ⬆️
baseapp/options.go 67.92% <0.00%> (-0.60%) ⬇️
client/broadcast.go 54.54% <ø> (+2.99%) ⬆️
client/cmd.go 57.73% <ø> (ø)
client/config/toml.go 55.55% <ø> (ø)
client/context.go 54.49% <ø> (-1.79%) ⬇️
client/flags/flags.go 19.35% <ø> (-0.32%) ⬇️
... and 226 more

x/auth/helpers/add_genesis_account_helper.go Outdated Show resolved Hide resolved
x/auth/helpers/add_genesis_account_helper.go Outdated Show resolved Hide resolved
x/auth/helpers/add_genesis_account_helper.go Outdated Show resolved Hide resolved
x/auth/helpers/add_genesis_account_helper.go Outdated Show resolved Hide resolved
@likhita-809 likhita-809 marked this pull request as ready for review September 20, 2022 07:46
@likhita-809 likhita-809 requested a review from a team as a code owner September 20, 2022 07:46
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK, @ValarDragon want to take a peek as well?

x/auth/helpers/add_genesis_account_helper.go Outdated Show resolved Hide resolved
Copy link
Member

@julienrbrt julienrbrt 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 two nits:

  • can the helper file name be more generic
  • can we have go doc that explains all the arguments

return fmt.Errorf("failed to parse coins: %w", err)
}

appendflag, _ := cmd.Flags().GetBool(flagAppendMode)

Check warning

Code scanning / gosec

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.
Copy link
Contributor

@alexanderbez alexanderbez 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 left a few comments 👍

simapp/simd/cmd/genaccounts.go Outdated Show resolved Hide resolved
x/auth/helpers/genaccounts.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

👏

@likhita-809
Copy link
Contributor Author

@ValarDragon wanna have a final look ?

@julienrbrt
Copy link
Member

I think we can merge this now due to the lack of answer. We can always iterate on it if necessary.

@julienrbrt julienrbrt enabled auto-merge (squash) September 23, 2022 19:10
@julienrbrt julienrbrt merged commit 09b0f58 into main Sep 23, 2022
@julienrbrt julienrbrt deleted the likhita/add-genesis-account-helper branch September 23, 2022 19:25
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make helper functions for adding accounts to genesis state.
5 participants