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: Add x/precisebank module basic setup #1906

Merged
merged 8 commits into from
May 10, 2024

Conversation

drklee3
Copy link
Member

@drklee3 drklee3 commented May 9, 2024

Description

  • Add initial setup and empty genesis type for x/precisebank
  • Basic tests with mostly empty values, to be filled out with additional implementation

Checklist

  • Changelog has been updated as necessary.

@drklee3 drklee3 force-pushed the dl-precisebank/01-module-setup branch from 260b21e to e713c93 Compare May 9, 2024 21:35
@drklee3 drklee3 marked this pull request as ready for review May 9, 2024 21:55
@drklee3 drklee3 merged commit 3c53e72 into master May 10, 2024
11 checks passed
@drklee3 drklee3 deleted the dl-precisebank/01-module-setup branch May 10, 2024 16:30
Comment on lines +23 to +26
// initialize module account
if moduleAcc := ak.GetModuleAccount(ctx, types.ModuleName); moduleAcc == nil {
panic(fmt.Sprintf("%s module account has not been set", types.ModuleName))
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we add a test for this similar to the one we have in x/community?

func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
tApp := app.NewTestApp()
ctx := tApp.NewContext(true, tmproto.Header{Height: 1})
tApp.InitializeFromGenesisStates()
accKeeper := tApp.GetAccountKeeper()
acc := accKeeper.GetAccount(ctx, authtypes.NewModuleAddress(types.ModuleName))
require.NotNil(t, acc)
}

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.

3 participants