Skip to content

Commit

Permalink
Merge branch 'main' into robert/auction-endblocker
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba authored Apr 17, 2024
2 parents 8adea3f + b0413b6 commit bffe045
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 1,061 deletions.
3 changes: 0 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,6 @@ func New(
panic(fmt.Sprintf("error while reading wasm config: %s", err))
}

// Register umee custom plugin to wasm
wasmOpts = append(uwasm.RegisterCustomPlugins(app.LeverageKeeper, app.OracleKeeper, app.IncentiveKeeper,
app.MetokenKeeperB), wasmOpts...)
// Register stargate queries
wasmOpts = append(wasmOpts, uwasm.RegisterStargateQueries(*bApp.GRPCQueryRouter(), appCodec)...)
availableCapabilities := strings.Join(AllCapabilities(), ",")
Expand Down
25 changes: 0 additions & 25 deletions app/wasm/custom_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,9 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"

"github.com/umee-network/umee/v6/app/wasm/msg"
"github.com/umee-network/umee/v6/app/wasm/query"
inckeeper "github.com/umee-network/umee/v6/x/incentive/keeper"
leveragekeeper "github.com/umee-network/umee/v6/x/leverage/keeper"
metokenkeeper "github.com/umee-network/umee/v6/x/metoken/keeper"
oraclekeeper "github.com/umee-network/umee/v6/x/oracle/keeper"
)

// RegisterCustomPlugins expose the queries and msgs of native modules to wasm.
func RegisterCustomPlugins(
leverageKeeper leveragekeeper.Keeper,
oracleKeeper oraclekeeper.Keeper,
incentiveKeeper inckeeper.Keeper,
metokenBuilder metokenkeeper.Builder,
) []wasmkeeper.Option {
wasmQueryPlugin := query.NewQueryPlugin(leverageKeeper, oracleKeeper, incentiveKeeper, metokenBuilder)
queryPluginOpt := wasmkeeper.WithQueryPlugins(&wasmkeeper.QueryPlugins{
Custom: wasmQueryPlugin.CustomQuerier(),
})

messagePluginOpt := wasmkeeper.WithMessageHandlerDecorator(msg.NewMessagePlugin(leverageKeeper))

return []wasmkeeper.Option{
queryPluginOpt,
messagePluginOpt,
}
}

// RegisterStargateQueries expose the stargate queries
func RegisterStargateQueries(queryRouter baseapp.GRPCQueryRouter, codec codec.Codec) []wasmkeeper.Option {
queryPluginOpt := wasmkeeper.WithQueryPlugins(&wasmkeeper.QueryPlugins{
Expand Down
106 changes: 0 additions & 106 deletions app/wasm/msg/handler_leverage.go

This file was deleted.

82 changes: 0 additions & 82 deletions app/wasm/msg/plugin.go

This file was deleted.

30 changes: 0 additions & 30 deletions app/wasm/msg/types.go

This file was deleted.

107 changes: 0 additions & 107 deletions app/wasm/query/handle_incentive.go

This file was deleted.

Loading

0 comments on commit bffe045

Please sign in to comment.