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: export AccountKeeper interface instead of concrete type #88

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

JimLarson
Copy link

Description

To assist in creating an AccountKeeper wrapper, export AccountKeeper as an interface and keep the concrete implementation local to its module.

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)

@JimLarson JimLarson self-assigned this Jul 27, 2021
@JimLarson JimLarson requested review from michaelfig and zmanian July 27, 2021 16:59
Copy link
Collaborator

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

Just one minor nit. Otherwise, LGTM!

Comment on lines 7 to 14
"github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
"github.com/cosmos/cosmos-sdk/x/auth/types"
)

// HandlerOptions are the options required for constructing a default SDK AnteHandler.
type HandlerOptions struct {
AccountKeeper AccountKeeper
AccountKeeper keeper.AccountKeeper
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please revert the changes to this file. AccountKeeper is found in x/auth/ante/expected_keepers.go, so there should be no reason to import the full keeper.AccountKeeper interface.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@JimLarson JimLarson force-pushed the jim-account-keeper-if branch from ebf186e to 4c6c348 Compare July 28, 2021 19:41
Allows use of any implementation that meets the interface.
Will be used to wrap and selectively override methods.
@JimLarson JimLarson force-pushed the jim-account-keeper-if branch from 4c6c348 to c506ce9 Compare July 29, 2021 03:52
@JimLarson JimLarson marked this pull request as ready for review July 29, 2021 03:52
@JimLarson JimLarson merged commit b8438aa into Agoric Jul 29, 2021
@JimLarson JimLarson deleted the jim-account-keeper-if branch July 29, 2021 05:11
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.

2 participants