/
expected_keepers.go
36 lines (30 loc) · 1.27 KB
/
expected_keepers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
// AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
SetAccount(ctx sdk.Context, acc authtypes.AccountI)
// Methods imported from account should be defined here
}
// BankKeeper defines the expected interface needed to retrieve account balances.
type BankKeeper interface {
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
// Methods imported from bank should be defined here
}
type NftKeeper interface {
GetOwner(ctx sdk.Context, classID string, nftID string) sdk.AccAddress
}
type VeKeeper interface {
GetTotalVotingPower(ctx sdk.Context, atTime uint64, atBlock int64) sdk.Int
GetVotingPower(ctx sdk.Context, veID uint64, atTime uint64, atBlock int64) sdk.Int
IncVeAttached(ctx sdk.Context, veID uint64)
DecVeAttached(ctx sdk.Context, veID uint64)
}
type VoterKeeper interface {
DistributeReward(ctx sdk.Context, poolDenom string)
}