-
Notifications
You must be signed in to change notification settings - Fork 50
/
keeper.go
36 lines (31 loc) · 1.01 KB
/
keeper.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 keeper
import (
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/certikfoundation/shentu/x/oracle/types"
)
type Keeper struct {
cdc *codec.Codec
storeKey sdk.StoreKey
authKeeper types.AuthKeeper
distrKeeper types.DistrKeeper
stakingKeeper types.StakingKeeper
supplyKeeper types.SupplyKeeper
paramSpace types.ParamSubspace
}
func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, authKeeper types.AuthKeeper, distriKeeper types.DistrKeeper,
stakingKeeper types.StakingKeeper, supplyKeeper types.SupplyKeeper, paramSpace types.ParamSubspace) Keeper {
return Keeper{
cdc: cdc,
paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()),
storeKey: storeKey,
authKeeper: authKeeper,
distrKeeper: distriKeeper,
stakingKeeper: stakingKeeper,
supplyKeeper: supplyKeeper,
}
}
// GetAuthKeeper returns the auth keeper wrapped in module keeper.
func (k Keeper) GetAuthKeeper() types.AuthKeeper {
return k.authKeeper
}