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

refactor: clean up keeper interfaces #2394

Merged
merged 6 commits into from
Aug 13, 2022
Merged

refactor: clean up keeper interfaces #2394

merged 6 commits into from
Aug 13, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Aug 13, 2022

Closes: #XXX

What is the purpose of the change

  • Removes unused methods from keeper interfaces
  • Renames DistrKeeper to CommunityPoolKeeper
  • Removes epoch keeper from txfees

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

@p0mvn p0mvn added the A:backport/v11.x backport patches to v11.x branch label Aug 13, 2022
@github-actions github-actions bot added the C:docs Improvements or additions to documentation label Aug 13, 2022
@p0mvn p0mvn marked this pull request as ready for review August 13, 2022 01:07
@p0mvn p0mvn requested a review from a team August 13, 2022 01:07
Comment on lines 50 to 55
// TxFeesKeeper defines the expected transaction fee keeper
type TxFeesKeeper interface {
ConvertToBaseToken(ctx sdk.Context, inputFee sdk.Coin) (sdk.Coin, error)
GetBaseDenom(ctx sdk.Context) (denom string, err error)
GetFeeToken(ctx sdk.Context, denom string) (FeeToken, error)
}
Copy link
Member

@ValarDragon ValarDragon Aug 13, 2022

Choose a reason for hiding this comment

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

Lets keep this one, so other modules can import it, rather than having to redefine it locally

(I think types packages defining succinct, exported interfaces that other modules can directly reference is good when applicable)

Looks like we don't do this already, but we should have a type check for txfees keeper implementing this interface

Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

Awesome, this looks great other than my one comment!

@p0mvn p0mvn merged commit 1313b63 into main Aug 13, 2022
@p0mvn p0mvn deleted the roman/cleanup-interfaces branch August 13, 2022 02:18
mergify bot pushed a commit that referenced this pull request Aug 13, 2022
* refactor: clean up keeper  interfaces

* rename community pool keeper

* changelog

* restore TxFeesKeeper and type check

(cherry picked from commit 1313b63)

# Conflicts:
#	CHANGELOG.md
#	app/keepers/keepers.go
#	x/incentives/keeper/gauge.go
#	x/incentives/keeper/keeper.go
#	x/txfees/types/expected_keepers.go
p0mvn added a commit that referenced this pull request Aug 13, 2022
Co-authored-by: Roman <ackhtariev@gmail.com>
@github-actions github-actions bot mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v11.x backport patches to v11.x branch C:app-wiring Changes to the app folder C:docs Improvements or additions to documentation C:x/gamm Changes, features and bugs related to the gamm module. C:x/incentives C:x/lockup C:x/mint C:x/pool-incentives C:x/superfluid C:x/tokenfactory C:x/txfees
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants