-
Notifications
You must be signed in to change notification settings - Fork 563
/
expected_keepers.go
34 lines (28 loc) · 1.2 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
package types
import (
"context"
"time"
upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)
// StakingKeeper expected staking keeper
type StakingKeeper interface {
GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, error)
UnbondingTime(ctx context.Context) (time.Duration, error)
}
// UpgradeKeeper expected upgrade keeper
type UpgradeKeeper interface {
ClearIBCState(ctx context.Context, lastHeight int64) error
GetUpgradePlan(ctx context.Context) (plan upgradetypes.Plan, err error)
GetUpgradedClient(ctx context.Context, height int64) ([]byte, error)
SetUpgradedClient(ctx context.Context, planHeight int64, bz []byte) error
GetUpgradedConsensusState(ctx context.Context, lastHeight int64) ([]byte, error)
SetUpgradedConsensusState(ctx context.Context, planHeight int64, bz []byte) error
ScheduleUpgrade(ctx context.Context, plan upgradetypes.Plan) error
}
// ParamSubspace defines the expected Subspace interface for module parameters.
type ParamSubspace interface {
GetParamSet(ctx sdk.Context, ps paramtypes.ParamSet)
}