Skip to content

Commit

Permalink
refactor: update 29-fee to use runtime.Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
bznein committed Dec 3, 2024
1 parent 4f37cf6 commit 0c37e27
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 53 deletions.
4 changes: 2 additions & 2 deletions modules/apps/29-fee/keeper/escrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ func (k Keeper) distributeFee(ctx context.Context, receiver, refundAccAddress sd
err := k.bankKeeper.SendCoinsFromModuleToAccount(cacheCtx, types.ModuleName, receiver, fee)
if err != nil {
if bytes.Equal(receiver, refundAccAddress) {
k.Logger(ctx).Error("error distributing fee", "receiver address", receiver, "fee", fee)
k.Logger.Error("error distributing fee", "receiver address", receiver, "fee", fee)
return // if sending to the refund address already failed, then return (no-op)
}

// if an error is returned from x/bank and the receiver is not the refundAccAddress
// then attempt to refund the fee to the original sender
err := k.bankKeeper.SendCoinsFromModuleToAccount(cacheCtx, types.ModuleName, refundAccAddress, fee)
if err != nil {
k.Logger(ctx).Error("error refunding fee to the original sender", "refund address", refundAccAddress, "fee", fee)
k.Logger.Error("error refunding fee to the original sender", "refund address", refundAccAddress, "fee", fee)
return // if sending to the refund address fails, no-op
}

Expand Down
6 changes: 3 additions & 3 deletions modules/apps/29-fee/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (k Keeper) IncentivizedPackets(ctx context.Context, req *types.QueryIncenti

var identifiedPackets []types.IdentifiedPacketFees

store := prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), []byte(types.FeesInEscrowPrefix))
store := prefix.NewStore(runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)), []byte(types.FeesInEscrowPrefix))
pagination, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
packetID, err := types.ParseKeyFeesInEscrow(types.FeesInEscrowPrefix + string(key))
if err != nil {
Expand Down Expand Up @@ -90,7 +90,7 @@ func (k Keeper) IncentivizedPacketsForChannel(goCtx context.Context, req *types.

var packets []*types.IdentifiedPacketFees
keyPrefix := types.KeyFeesInEscrowChannelPrefix(req.PortId, req.ChannelId)
store := prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), keyPrefix)
store := prefix.NewStore(runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)), keyPrefix)
pagination, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
packetID, err := types.ParseKeyFeesInEscrow(string(keyPrefix) + string(key))
if err != nil {
Expand Down Expand Up @@ -235,7 +235,7 @@ func (k Keeper) FeeEnabledChannels(ctx context.Context, req *types.QueryFeeEnabl
}

var feeEnabledChannels []types.FeeEnabledChannel
store := prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), []byte(types.FeeEnabledKeyPrefix))
store := prefix.NewStore(runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)), []byte(types.FeeEnabledKeyPrefix))
pagination, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
portID, channelID, err := types.ParseKeyFeeEnabled(types.FeeEnabledKeyPrefix + string(key))
if err != nil {
Expand Down
74 changes: 33 additions & 41 deletions modules/apps/29-fee/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package keeper
import (
"context"

corestore "cosmossdk.io/core/store"
"cosmossdk.io/log"
"cosmossdk.io/core/appmodule"
storetypes "cosmossdk.io/store/types"

"github.com/cosmos/cosmos-sdk/codec"
Expand All @@ -14,7 +13,6 @@ import (
"github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types"
channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types"
porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
coretypes "github.com/cosmos/ibc-go/v9/modules/core/types"
)

Expand All @@ -24,8 +22,8 @@ var _ types.ChannelKeeper = (*Keeper)(nil)

// Keeper defines the IBC fungible transfer keeper
type Keeper struct {
storeService corestore.KVStoreService
cdc codec.BinaryCodec
appmodule.Environment
cdc codec.BinaryCodec

authKeeper types.AccountKeeper
ics4Wrapper porttypes.ICS4Wrapper
Expand All @@ -35,13 +33,13 @@ type Keeper struct {

// NewKeeper creates a new 29-fee Keeper instance
func NewKeeper(
cdc codec.BinaryCodec, storeService corestore.KVStoreService,
cdc codec.BinaryCodec, env appmodule.Environment,
ics4Wrapper porttypes.ICS4Wrapper, channelKeeper types.ChannelKeeper,
authKeeper types.AccountKeeper, bankKeeper types.BankKeeper,
) Keeper {
return Keeper{
cdc: cdc,
storeService: storeService,
Environment: env,
ics4Wrapper: ics4Wrapper,
channelKeeper: channelKeeper,
authKeeper: authKeeper,
Expand All @@ -61,12 +59,6 @@ func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper {
return k.ics4Wrapper
}

// Logger returns a module-specific logger.
func (Keeper) Logger(ctx context.Context) log.Logger {
sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917
return sdkCtx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName)
}

// GetChannel wraps IBC ChannelKeeper's GetChannel function
func (k Keeper) GetChannel(ctx context.Context, portID, channelID string) (channeltypes.Channel, bool) {
return k.channelKeeper.GetChannel(ctx, portID, channelID)
Expand Down Expand Up @@ -107,7 +99,7 @@ func (k Keeper) EscrowAccountHasBalance(ctx context.Context, coins sdk.Coins) bo
// identified by channel and port identifiers.
// Please see ADR 004 for more information.
func (k Keeper) lockFeeModule(ctx context.Context) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
if err := store.Set(types.KeyLocked(), []byte{1}); err != nil {
panic(err)
}
Expand All @@ -116,7 +108,7 @@ func (k Keeper) lockFeeModule(ctx context.Context) {
// IsLocked indicates if the fee module is locked
// Please see ADR 004 for more information.
func (k Keeper) IsLocked(ctx context.Context) bool {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
has, err := store.Has(types.KeyLocked())
if err != nil {
panic(err)
Expand All @@ -127,15 +119,15 @@ func (k Keeper) IsLocked(ctx context.Context) bool {
// SetFeeEnabled sets a flag to determine if fee handling logic should run for the given channel
// identified by channel and port identifiers.
func (k Keeper) SetFeeEnabled(ctx context.Context, portID, channelID string) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
if err := store.Set(types.KeyFeeEnabled(portID, channelID), []byte{1}); err != nil {
panic(err)
}
}

// DeleteFeeEnabled deletes the fee enabled flag for a given portID and channelID
func (k Keeper) DeleteFeeEnabled(ctx context.Context, portID, channelID string) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
if err := store.Delete(types.KeyFeeEnabled(portID, channelID)); err != nil {
panic(err)
}
Expand All @@ -144,7 +136,7 @@ func (k Keeper) DeleteFeeEnabled(ctx context.Context, portID, channelID string)
// IsFeeEnabled returns whether fee handling logic should be run for the given port. It will check the
// fee enabled flag for the given port and channel identifiers
func (k Keeper) IsFeeEnabled(ctx context.Context, portID, channelID string) bool {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
has, err := store.Has(types.KeyFeeEnabled(portID, channelID))
if err != nil {
panic(err)
Expand All @@ -154,9 +146,9 @@ func (k Keeper) IsFeeEnabled(ctx context.Context, portID, channelID string) bool

// GetAllFeeEnabledChannels returns a list of all ics29 enabled channels containing portID & channelID that are stored in state
func (k Keeper) GetAllFeeEnabledChannels(ctx context.Context) []types.FeeEnabledChannel {
store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, []byte(types.FeeEnabledKeyPrefix))
defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() })
defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() })

var enabledChArr []types.FeeEnabledChannel
for ; iterator.Valid(); iterator.Next() {
Expand All @@ -177,7 +169,7 @@ func (k Keeper) GetAllFeeEnabledChannels(ctx context.Context) []types.FeeEnabled

// GetPayeeAddress retrieves the fee payee address stored in state given the provided channel identifier and relayer address
func (k Keeper) GetPayeeAddress(ctx context.Context, relayerAddr, channelID string) (string, bool) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyPayee(relayerAddr, channelID)

bz, err := store.Get(key)
Expand All @@ -194,17 +186,17 @@ func (k Keeper) GetPayeeAddress(ctx context.Context, relayerAddr, channelID stri

// SetPayeeAddress stores the fee payee address in state keyed by the provided channel identifier and relayer address
func (k Keeper) SetPayeeAddress(ctx context.Context, relayerAddr, payeeAddr, channelID string) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
if err := store.Set(types.KeyPayee(relayerAddr, channelID), []byte(payeeAddr)); err != nil {
panic(err)
}
}

// GetAllPayees returns all registered payees addresses
func (k Keeper) GetAllPayees(ctx context.Context) []types.RegisteredPayee {
store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, []byte(types.PayeeKeyPrefix))
defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() })
defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() })

var registeredPayees []types.RegisteredPayee
for ; iterator.Valid(); iterator.Next() {
Expand All @@ -228,15 +220,15 @@ func (k Keeper) GetAllPayees(ctx context.Context) []types.RegisteredPayee {
// SetCounterpartyPayeeAddress maps the destination chain counterparty payee address to the source relayer address
// The receiving chain must store the mapping from: address -> counterpartyPayeeAddress for the given channel
func (k Keeper) SetCounterpartyPayeeAddress(ctx context.Context, address, counterpartyAddress, channelID string) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
if err := store.Set(types.KeyCounterpartyPayee(address, channelID), []byte(counterpartyAddress)); err != nil {
panic(err)
}
}

// GetCounterpartyPayeeAddress gets the counterparty payee address given a destination relayer address
func (k Keeper) GetCounterpartyPayeeAddress(ctx context.Context, address, channelID string) (string, bool) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyCounterpartyPayee(address, channelID)

addr, err := store.Get(key)
Expand All @@ -252,9 +244,9 @@ func (k Keeper) GetCounterpartyPayeeAddress(ctx context.Context, address, channe

// GetAllCounterpartyPayees returns all registered counterparty payee addresses
func (k Keeper) GetAllCounterpartyPayees(ctx context.Context) []types.RegisteredCounterpartyPayee {
store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, []byte(types.CounterpartyPayeeKeyPrefix))
defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() })
defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() })

var registeredCounterpartyPayees []types.RegisteredCounterpartyPayee
for ; iterator.Valid(); iterator.Next() {
Expand All @@ -277,15 +269,15 @@ func (k Keeper) GetAllCounterpartyPayees(ctx context.Context) []types.Registered

// SetRelayerAddressForAsyncAck sets the forward relayer address during OnRecvPacket in case of async acknowledgement
func (k Keeper) SetRelayerAddressForAsyncAck(ctx context.Context, packetID channeltypes.PacketId, address string) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
if err := store.Set(types.KeyRelayerAddressForAsyncAck(packetID), []byte(address)); err != nil {
panic(err)
}
}

// GetRelayerAddressForAsyncAck gets forward relayer address for a particular packet
func (k Keeper) GetRelayerAddressForAsyncAck(ctx context.Context, packetID channeltypes.PacketId) (string, bool) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyRelayerAddressForAsyncAck(packetID)

addr, err := store.Get(key)
Expand All @@ -302,9 +294,9 @@ func (k Keeper) GetRelayerAddressForAsyncAck(ctx context.Context, packetID chann

// GetAllForwardRelayerAddresses returns all forward relayer addresses stored for async acknowledgements
func (k Keeper) GetAllForwardRelayerAddresses(ctx context.Context) []types.ForwardRelayerAddress {
store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, []byte(types.ForwardRelayerPrefix))
defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() })
defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() })

var forwardRelayerAddr []types.ForwardRelayerAddress
for ; iterator.Valid(); iterator.Next() {
Expand All @@ -326,7 +318,7 @@ func (k Keeper) GetAllForwardRelayerAddresses(ctx context.Context) []types.Forwa

// DeleteForwardRelayerAddress deletes the forwardRelayerAddr associated with the packetID
func (k Keeper) DeleteForwardRelayerAddress(ctx context.Context, packetID channeltypes.PacketId) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyRelayerAddressForAsyncAck(packetID)
if err := store.Delete(key); err != nil {
panic(err)
Expand All @@ -335,7 +327,7 @@ func (k Keeper) DeleteForwardRelayerAddress(ctx context.Context, packetID channe

// GetFeesInEscrow returns all escrowed packet fees for a given packetID
func (k Keeper) GetFeesInEscrow(ctx context.Context, packetID channeltypes.PacketId) (types.PacketFees, bool) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyFeesInEscrow(packetID)
bz, err := store.Get(key)
if err != nil {
Expand All @@ -350,7 +342,7 @@ func (k Keeper) GetFeesInEscrow(ctx context.Context, packetID channeltypes.Packe

// HasFeesInEscrow returns true if packet fees exist for the provided packetID
func (k Keeper) HasFeesInEscrow(ctx context.Context, packetID channeltypes.PacketId) bool {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyFeesInEscrow(packetID)
has, err := store.Has(key)
if err != nil {
Expand All @@ -361,7 +353,7 @@ func (k Keeper) HasFeesInEscrow(ctx context.Context, packetID channeltypes.Packe

// SetFeesInEscrow sets the given packet fees in escrow keyed by the packetID
func (k Keeper) SetFeesInEscrow(ctx context.Context, packetID channeltypes.PacketId, fees types.PacketFees) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
bz := k.MustMarshalFees(fees)
if err := store.Set(types.KeyFeesInEscrow(packetID), bz); err != nil {
panic(err)
Expand All @@ -370,7 +362,7 @@ func (k Keeper) SetFeesInEscrow(ctx context.Context, packetID channeltypes.Packe

// DeleteFeesInEscrow deletes the fee associated with the given packetID
func (k Keeper) DeleteFeesInEscrow(ctx context.Context, packetID channeltypes.PacketId) {
store := k.storeService.OpenKVStore(ctx)
store := k.KVStoreService.OpenKVStore(ctx)
key := types.KeyFeesInEscrow(packetID)
if err := store.Delete(key); err != nil {
panic(err)
Expand All @@ -381,10 +373,10 @@ func (k Keeper) DeleteFeesInEscrow(ctx context.Context, packetID channeltypes.Pa
func (k Keeper) GetIdentifiedPacketFeesForChannel(ctx context.Context, portID, channelID string) []types.IdentifiedPacketFees {
var identifiedPacketFees []types.IdentifiedPacketFees

store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, types.KeyFeesInEscrowChannelPrefix(portID, channelID))

defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() })
defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() })
for ; iterator.Valid(); iterator.Next() {
packetID, err := types.ParseKeyFeesInEscrow(string(iterator.Key()))
if err != nil {
Expand All @@ -402,9 +394,9 @@ func (k Keeper) GetIdentifiedPacketFeesForChannel(ctx context.Context, portID, c

// GetAllIdentifiedPacketFees returns a list of all IdentifiedPacketFees that are stored in state
func (k Keeper) GetAllIdentifiedPacketFees(ctx context.Context) []types.IdentifiedPacketFees {
store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, []byte(types.FeesInEscrowPrefix))
defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() })
defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() })

var identifiedFees []types.IdentifiedPacketFees
for ; iterator.Valid(); iterator.Next() {
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewMigrator(keeper Keeper) Migrator {
// Migrate1to2 migrates ibc-fee module from ConsensusVersion 1 to 2
// by refunding leftover fees to the refund address.
func (m Migrator) Migrate1to2(ctx sdk.Context) error {
store := runtime.KVStoreAdapter(m.keeper.storeService.OpenKVStore(ctx))
store := runtime.KVStoreAdapter(m.keeper.KVStoreService.OpenKVStore(ctx))
iterator := storetypes.KVStorePrefixIterator(store, []byte(types.FeesInEscrowPrefix))
defer coretypes.LogDeferred(ctx.Logger(), func() error { return iterator.Close() })

Expand Down
4 changes: 2 additions & 2 deletions modules/apps/29-fee/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (k Keeper) RegisterPayee(ctx context.Context, msg *types.MsgRegisterPayee)

k.SetPayeeAddress(ctx, msg.Relayer, msg.Payee, msg.ChannelId)

k.Logger(ctx).Info("registering payee address for relayer", "relayer", msg.Relayer, "payee", msg.Payee, "channel", msg.ChannelId)
k.Logger.Info("registering payee address for relayer", "relayer", msg.Relayer, "payee", msg.Payee, "channel", msg.ChannelId)

emitRegisterPayeeEvent(ctx, msg.Relayer, msg.Payee, msg.ChannelId)

Expand All @@ -64,7 +64,7 @@ func (k Keeper) RegisterCounterpartyPayee(ctx context.Context, msg *types.MsgReg

k.SetCounterpartyPayeeAddress(ctx, msg.Relayer, msg.CounterpartyPayee, msg.ChannelId)

k.Logger(ctx).Info("registering counterparty payee for relayer", "relayer", msg.Relayer, "counterparty payee", msg.CounterpartyPayee, "channel", msg.ChannelId)
k.Logger.Info("registering counterparty payee for relayer", "relayer", msg.Relayer, "counterparty payee", msg.CounterpartyPayee, "channel", msg.ChannelId)

emitRegisterCounterpartyPayeeEvent(ctx, msg.Relayer, msg.CounterpartyPayee, msg.ChannelId)

Expand Down
3 changes: 2 additions & 1 deletion modules/apps/callbacks/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ func NewSimApp(

// IBC Fee Module keeper
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]),
appCodec,
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, "x/ibc-fee")),
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
app.IBCKeeper.ChannelKeeper,
app.AuthKeeper, app.BankKeeper,
Expand Down
3 changes: 2 additions & 1 deletion modules/light-clients/08-wasm/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ func NewSimApp(

// IBC Fee Module keeper
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]),
appCodec,
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, "x/ibc-fee")),
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
app.IBCKeeper.ChannelKeeper,
app.AuthKeeper, app.BankKeeper,
Expand Down
3 changes: 2 additions & 1 deletion simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ func NewSimApp(

// IBC Fee Module keeper
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]),
appCodec,
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, "x/ibc-fee")),
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
app.IBCKeeper.ChannelKeeper,
app.AuthKeeper, app.BankKeeper,
Expand Down
Loading

0 comments on commit 0c37e27

Please sign in to comment.