mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-05-23 23:36:40 +00:00

* extended AttestMachine FundAccount to support a given fee denominator * renamed testutil/network/network.go to testutil/network/loader.go * renamed new to Load * integrated cosmos/testutil/network to planetmint-go/testutil/network * changed to plmnt token tests only! * removed obsolete variables * fixed newest linter issues --------- Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
59 lines
1.7 KiB
Go
59 lines
1.7 KiB
Go
package keeper
|
|
|
|
import (
|
|
"github.com/cometbft/cometbft/libs/log"
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
|
|
|
"github.com/planetmint/planetmint-go/x/machine/types"
|
|
)
|
|
|
|
type (
|
|
Keeper struct {
|
|
cdc codec.BinaryCodec
|
|
storeKey storetypes.StoreKey
|
|
taIndexStoreKey storetypes.StoreKey
|
|
issuerPlanetmintIndexStoreKey storetypes.StoreKey
|
|
issuerLiquidIndexStoreKey storetypes.StoreKey
|
|
taStoreKey storetypes.StoreKey
|
|
addressIndexStoreKey storetypes.StoreKey
|
|
memKey storetypes.StoreKey
|
|
paramstore paramtypes.Subspace
|
|
}
|
|
)
|
|
|
|
func NewKeeper(
|
|
cdc codec.BinaryCodec,
|
|
storeKey,
|
|
indexStoreKey,
|
|
issuerPlanetmintIndexStoreKey,
|
|
issuerLiquidIndexStoreKey,
|
|
taStoreKey,
|
|
addressIndexStoreKey,
|
|
memKey storetypes.StoreKey,
|
|
ps paramtypes.Subspace,
|
|
) *Keeper {
|
|
// set KeyTable if it has not already been set
|
|
if !ps.HasKeyTable() {
|
|
ps = ps.WithKeyTable(types.ParamKeyTable())
|
|
}
|
|
|
|
return &Keeper{
|
|
cdc: cdc,
|
|
storeKey: storeKey,
|
|
taIndexStoreKey: indexStoreKey,
|
|
issuerPlanetmintIndexStoreKey: issuerPlanetmintIndexStoreKey,
|
|
issuerLiquidIndexStoreKey: issuerLiquidIndexStoreKey,
|
|
taStoreKey: taStoreKey,
|
|
addressIndexStoreKey: addressIndexStoreKey,
|
|
memKey: memKey,
|
|
paramstore: ps,
|
|
}
|
|
}
|
|
|
|
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
|
|
return ctx.Logger().With("module", "x/"+types.ModuleName)
|
|
}
|