-
Notifications
You must be signed in to change notification settings - Fork 206
/
expected_keepers.go
44 lines (37 loc) · 1.96 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
37
38
39
40
41
42
43
44
package types
import (
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
epochstoragetypes "github.com/lavanet/lava/x/epochstorage/types"
spectypes "github.com/lavanet/lava/x/spec/types"
)
// AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountKeeper interface {
GetModuleAddress(name string) sdk.AccAddress
GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
// Methods imported from account should be defined here
}
// BankKeeper defines the expected interface needed to retrieve account balances.
type BankKeeper interface {
BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error
// Methods imported from bank should be defined here
}
type EpochstorageKeeper interface {
GetNextEpoch(ctx sdk.Context, block uint64) (nextEpoch uint64, erro error)
GetStakeEntryByAddressCurrent(ctx sdk.Context, chainID string, address sdk.AccAddress) (value epochstoragetypes.StakeEntry, found bool, index uint64)
ModifyStakeEntryCurrent(ctx sdk.Context, chainID string, stakeEntry epochstoragetypes.StakeEntry, removeIndex uint64)
UnstakeHoldBlocks(ctx sdk.Context, block uint64) (res uint64)
UnstakeHoldBlocksStatic(ctx sdk.Context, block uint64) (res uint64)
// Methods imported from epochstorage should be defined here
}
type SpecKeeper interface {
IsSpecFoundAndActive(ctx sdk.Context, chainID string) (active bool, found bool, providerType spectypes.Spec_ProvidersTypes)
}
type StakingKeeper interface {
UnbondingTime(ctx sdk.Context) time.Duration
}