mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
30 lines
667 B
Go
30 lines
667 B
Go
|
package keeper
|
||
|
|
||
|
import (
|
||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
"github.com/cosmos/cosmos-sdk/x/params/subspace"
|
||
|
|
||
|
"github.com/kava-labs/kava/x/swap/types"
|
||
|
)
|
||
|
|
||
|
// Keeper keeper for the swap module
|
||
|
type Keeper struct {
|
||
|
key sdk.StoreKey
|
||
|
cdc *codec.Codec
|
||
|
paramSubspace subspace.Subspace
|
||
|
}
|
||
|
|
||
|
// NewKeeper creates a new keeper
|
||
|
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramstore subspace.Subspace) Keeper {
|
||
|
if !paramstore.HasKeyTable() {
|
||
|
paramstore = paramstore.WithKeyTable(types.ParamKeyTable())
|
||
|
}
|
||
|
|
||
|
return Keeper{
|
||
|
key: key,
|
||
|
cdc: cdc,
|
||
|
paramSubspace: paramstore,
|
||
|
}
|
||
|
}
|