Skip to content

Commit

Permalink
chore: remove ibcfee middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Jun 4, 2024
1 parent b4b1ace commit b4e2e1b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 24 deletions.
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import (
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
_ "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" // import for side-effects
_ "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" // import for side-effects
ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper"
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

Expand Down Expand Up @@ -137,7 +136,6 @@ type App struct {
// IBC
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
CapabilityKeeper *capabilitykeeper.Keeper
IBCFeeKeeper ibcfeekeeper.Keeper
IBCTransferKeeper ibctransferkeeper.Keeper

// Scoped IBC
Expand Down
6 changes: 0 additions & 6 deletions app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
"google.golang.org/protobuf/types/known/durationpb"
Expand Down Expand Up @@ -90,7 +89,6 @@ var (
evidencetypes.ModuleName,
authz.ModuleName,
ibctransfertypes.ModuleName,
ibcfeetypes.ModuleName,
feegrant.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
Expand Down Expand Up @@ -133,7 +131,6 @@ var (
capabilitytypes.ModuleName,
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
ibcfeetypes.ModuleName,

// KYVE modules
delegationtypes.ModuleName,
Expand All @@ -153,7 +150,6 @@ var (
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
capabilitytypes.ModuleName,
ibcfeetypes.ModuleName,

// KYVE modules
pooltypes.ModuleName,
Expand All @@ -180,7 +176,6 @@ var (

// IBC
{Account: ibctransfertypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner}},
{Account: ibcfeetypes.ModuleName},

// KYVE
{Account: bundlestypes.ModuleName},
Expand All @@ -202,7 +197,6 @@ var (

// IBC
ibctransfertypes.ModuleName,
ibcfeetypes.ModuleName,

// KYVE
bundlestypes.ModuleName,
Expand Down
17 changes: 2 additions & 15 deletions app/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import (
"github.com/cosmos/ibc-go/modules/capability"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee"
ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper"
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
Expand All @@ -36,7 +33,6 @@ func (app *App) registerIBCModules() {
storetypes.NewKVStoreKey(capabilitytypes.StoreKey),
storetypes.NewKVStoreKey(ibcexported.StoreKey),
storetypes.NewKVStoreKey(ibctransfertypes.StoreKey),
storetypes.NewKVStoreKey(ibcfeetypes.StoreKey),
storetypes.NewMemoryStoreKey(capabilitytypes.MemStoreKey),
storetypes.NewTransientStoreKey(paramstypes.TStoreKey),
); err != nil {
Expand Down Expand Up @@ -78,19 +74,12 @@ func (app *App) registerIBCModules() {
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler)

app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
app.appCodec, app.GetKey(ibcfeetypes.StoreKey),
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper,
)

// Create IBC transfer keeper
app.IBCTransferKeeper = ibctransferkeeper.NewKeeper(
app.appCodec,
app.GetKey(ibctransfertypes.StoreKey),
app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCFeeKeeper,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.AccountKeeper,
Expand All @@ -102,7 +91,7 @@ func (app *App) registerIBCModules() {
app.GovKeeper.SetLegacyRouter(govRouter)

// Create IBC modules with ibcfee middleware
transferIBCModule := ibcfee.NewIBCMiddleware(ibctransfer.NewIBCModule(app.IBCTransferKeeper), app.IBCFeeKeeper)
transferIBCModule := ibctransfer.NewIBCModule(app.IBCTransferKeeper)

// Create static IBC router, add transfer route, then set and seal it
ibcRouter := porttypes.NewRouter().
Expand All @@ -119,7 +108,6 @@ func (app *App) registerIBCModules() {
if err := app.RegisterModules(
ibc.NewAppModule(app.IBCKeeper),
ibctransfer.NewAppModule(app.IBCTransferKeeper),
ibcfee.NewAppModule(app.IBCFeeKeeper),
capability.NewAppModule(app.appCodec, *app.CapabilityKeeper, false),
ibctm.AppModule{},
solomachine.AppModule{},
Expand All @@ -135,7 +123,6 @@ func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppMo
modules := map[string]appmodule.AppModule{
ibcexported.ModuleName: ibc.AppModule{},
ibctransfertypes.ModuleName: ibctransfer.AppModule{},
ibcfeetypes.ModuleName: ibcfee.AppModule{},
capabilitytypes.ModuleName: capability.AppModule{},
ibctm.ModuleName: ibctm.AppModule{},
solomachine.ModuleName: solomachine.AppModule{},
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v1_5/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func CreateStoreLoader(upgradeHeight int64) baseapp.StoreLoader {
"packetfowardmiddleware", // yes there is supposed to be a spelling error in "forward"
"icahost",
"icacontroller",
//"feeibc",
"feeibc",
},
}

Expand Down

0 comments on commit b4e2e1b

Please sign in to comment.