-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
R4R: x/bank: Keeper Intefaces #2146
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2146 +/- ##
========================================
Coverage 63.91% 63.91%
========================================
Files 134 134
Lines 8194 8194
========================================
Hits 5237 5237
Misses 2604 2604
Partials 353 353 |
Going to close this until we get more architecture and design discussions on how we want to handle banking and IBC in ethermint. |
x/bank/keeper.go
Outdated
// Keeper defines a module interface that facilitates the transfer of coins | ||
// between accounts. | ||
type Keeper interface { | ||
GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we define Keeper as
type Keeper interface {
SendKeeper
ViewKeeper
SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Tags, sdk.Error)
AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Tags, sdk.Error)
}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed we can! This was a quick job :-p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Codecov Report
@@ Coverage Diff @@
## develop #2146 +/- ##
========================================
Coverage 63.87% 63.87%
========================================
Files 140 140
Lines 8682 8682
========================================
Hits 5546 5546
Misses 2756 2756
Partials 380 380 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great idea :)
lint fail |
This lint bug seems to have crept its way into Should we just open a separate PR for this? |
Never mind, fixed in #2257. Merging |
@rigelrozanski fixed :-) |
Blocked on fixing non-determinism in |
Looks like this now just needs the merge conflicts to be fixed (Sorry my PR edited the exact same set of lines as this one) |
@ValarDragon no worries 😃 |
Team, Updated + resolved 👍 |
closes: #2145
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: