Skip to content

Commit

Permalink
app.go refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsingh33 committed May 4, 2023
1 parent 3827429 commit dd3f63b
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/osmosis-labs/osmosis/v15/x/ibc-rate-limit/ibcratelimitmodule"
ibcratelimittypes "github.com/osmosis-labs/osmosis/v15/x/ibc-rate-limit/types"


packetforward "github.com/strangelove-ventures/packet-forward-middleware/v4/router"
packetforwardkeeper "github.com/strangelove-ventures/packet-forward-middleware/v4/router/keeper"
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"
Expand Down Expand Up @@ -366,8 +365,8 @@ type App struct {
HooksICS4Wrapper ibchooks.ICS4Middleware
PacketForwardKeeper *packetforwardkeeper.Keeper

WasmKeeper wasm.Keeper
ContractKeeper *wasmkeeper.PermissionedKeeper
WasmKeeper wasm.Keeper
ContractKeeper *wasmkeeper.PermissionedKeeper
// the module manager
mm *module.Manager
// Module configurator
Expand Down Expand Up @@ -491,22 +490,13 @@ func New(
authtypes.ProtoBaseAccount,
app.ModuleAccountsPermissions(),
)
// app.BankKeeper = bankkeeper.NewBaseKeeper(
// app.cdc,
// app.keys[banktypes.StoreKey],
// app.AccountKeeper,
// app.GetSubspace(banktypes.ModuleName),
// app.ModuleAccountAddrs(),
// )
bKeeper := bankkeeper.NewBaseKeeper(
app.BankKeeper = bankkeeper.NewBaseKeeper(
app.cdc,
app.keys[banktypes.StoreKey],
app.AccountKeeper,
app.GetSubspace(banktypes.ModuleName),
app.ModuleAccountAddrs(),
)
app.BankKeeper = bKeeper
app.BankBaseKeeper = &bKeeper
stakingKeeper := stakingkeeper.NewKeeper(
app.cdc,
app.keys[stakingtypes.StoreKey],
Expand Down Expand Up @@ -841,9 +831,9 @@ func New(
)

var (
evidenceRouter = evidencetypes.NewRouter()
ibcRouter = ibcporttypes.NewRouter()
transferModule = ibctransfer.NewAppModule(app.IbcTransferKeeper)
evidenceRouter = evidencetypes.NewRouter()
ibcRouter = ibcporttypes.NewRouter()
transferModule = ibctransfer.NewAppModule(app.IbcTransferKeeper)
// transferIBCModule = ibctransfer.NewIBCModule(app.IbcTransferKeeper)
oracleModule = market.NewAppModule(app.cdc, app.MarketKeeper, app.BandoracleKeeper, app.AssetKeeper)
bandOracleIBCModule = bandoraclemodule.NewIBCModule(app.BandoracleKeeper)
Expand Down Expand Up @@ -1194,6 +1184,7 @@ func (a *App) WireICS20PreWasmKeeper(
hooksTransferModule := ibchooks.NewIBCMiddleware(&rateLimitingTransferModule, &a.HooksICS4Wrapper)
a.TransferStack = &hooksTransferModule
}

// Name returns the name of the App
func (a *App) Name() string { return a.BaseApp.Name() }

Expand Down

0 comments on commit dd3f63b

Please sign in to comment.