cosmos-sdk/x/gov/testutil/expected_keepers.go
mergify[bot] 9f7a16080a
refactor(x/staking)!: KVStoreService, return errors and use context.Context (backport #16324) (#16598)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Facundo Medica <facundomedica@gmail.com>
2023-06-19 11:40:27 -03:00

42 lines
1.1 KiB
Go

// This file only used to generate mocks
package testutil
import (
context "context"
"cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
"github.com/cosmos/cosmos-sdk/x/gov/types"
)
// AccountKeeper extends gov's actual expected AccountKeeper with additional
// methods used in tests.
type AccountKeeper interface {
types.AccountKeeper
IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) (stop bool))
}
// BankKeeper extends gov's actual expected BankKeeper with additional
// methods used in tests.
type BankKeeper interface {
bankkeeper.Keeper
}
// StakingKeeper extends gov's actual expected StakingKeeper with additional
// methods used in tests.
type StakingKeeper interface {
types.StakingKeeper
BondDenom(ctx context.Context) (string, error)
TokensFromConsensusPower(ctx context.Context, power int64) math.Int
}
// DistributionKeeper defines the expected distribution keeper
type DistributionKeeper interface {
FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error
}