mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
e14466547d
* wip: issuance module * add keeper and module methods * add begin blocker * add client * update events * add simulations * ignore v0.8 migration tests for now * ignore migration tests in ci * add test suite * update spec to match implementation details * add unblock method * address review comments * fix typos
34 lines
833 B
Go
34 lines
833 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/issuance/types"
|
|
)
|
|
|
|
// Keeper keeper for the issuance module
|
|
type Keeper struct {
|
|
key sdk.StoreKey
|
|
cdc *codec.Codec
|
|
paramSubspace subspace.Subspace
|
|
accountKeeper types.AccountKeeper
|
|
supplyKeeper types.SupplyKeeper
|
|
}
|
|
|
|
// NewKeeper returns a new keeper
|
|
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramstore subspace.Subspace, ak types.AccountKeeper, sk types.SupplyKeeper) Keeper {
|
|
if !paramstore.HasKeyTable() {
|
|
paramstore = paramstore.WithKeyTable(types.ParamKeyTable())
|
|
}
|
|
|
|
return Keeper{
|
|
key: key,
|
|
cdc: cdc,
|
|
paramSubspace: paramstore,
|
|
accountKeeper: ak,
|
|
supplyKeeper: sk,
|
|
}
|
|
}
|