-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(halo/evmstaking2): unit test for delegate event delivery (#2573)
Implements the unit test for the delegate event delivery. At the end of the test, we assert that the staking message server actually received the message of the expected type. issue: #2525
- Loading branch information
Showing
4 changed files
with
176 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package types | ||
|
||
import ( | ||
"context" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
stypes "github.com/cosmos/cosmos-sdk/x/staking/types" | ||
) | ||
|
||
type AuthKeeper interface { | ||
HasAccount(ctx context.Context, addr sdk.AccAddress) bool | ||
NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI | ||
SetAccount(ctx context.Context, acc sdk.AccountI) | ||
} | ||
|
||
type BankKeeper interface { | ||
MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error | ||
SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error | ||
} | ||
|
||
type StakingKeeper interface { | ||
GetValidator(ctx context.Context, addr sdk.ValAddress) (stypes.Validator, error) | ||
} | ||
|
||
type StakingMsgServer interface { | ||
CreateValidator(ctx context.Context, msg *stypes.MsgCreateValidator) (*stypes.MsgCreateValidatorResponse, error) | ||
Delegate(ctx context.Context, msg *stypes.MsgDelegate) (*stypes.MsgDelegateResponse, error) | ||
} |