Skip to content

Commit

Permalink
remove code that should come in a different PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed Jul 7, 2023
1 parent 0d97046 commit 98a354f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 83 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ module github.com/cosmos/ibc-go/v7

require (
cosmossdk.io/api v0.3.1
cosmossdk.io/core v0.5.1
cosmossdk.io/depinject v1.0.0-alpha.3
cosmossdk.io/errors v1.0.0-beta.7
cosmossdk.io/math v1.0.1
github.com/armon/go-metrics v0.4.1
Expand Down Expand Up @@ -34,6 +32,8 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/storage v1.29.0 // indirect
cosmossdk.io/core v0.5.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.3 // indirect
cosmossdk.io/log v1.1.0 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
Expand Down
66 changes: 0 additions & 66 deletions modules/core/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@ import (
"encoding/json"
"fmt"

"cosmossdk.io/core/appmodule"
"cosmossdk.io/depinject"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
store "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"

abci "github.com/cometbft/cometbft/abci/types"

capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"
clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
Expand Down Expand Up @@ -107,14 +100,6 @@ type AppModule struct {
keeper *keeper.Keeper
}

var _ appmodule.AppModule = AppModule{}

// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
func (am AppModule) IsOnePerModuleType() {}

// IsAppModule implements the appmodule.AppModule interface.
func (am AppModule) IsAppModule() {}

// NewAppModule creates a new AppModule object
func NewAppModule(k *keeper.Keeper) AppModule {
return AppModule{
Expand Down Expand Up @@ -214,54 +199,3 @@ func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
return nil
}

// App Wiring Setup

func init() {
appmodule.Register(&modulev1.Module{},
appmodule.Provide(ProvideModule),
)
}

type ModuleInputs struct {
depinject.In

Config *modulev1.Module
Cdc codec.Codec
Key *store.KVStoreKey

StakingKeeper clienttypes.StakingKeeper
UpgradeKeeper clienttypes.UpgradeKeeper
ScopedKeeper capabilitykeeper.ScopedKeeper

// LegacySubspace is used solely for migration of x/params managed parameters
LegacySubspace paramtypes.Subspace `optional:"true"`
}

type ModuleOutputs struct {
depinject.Out

IbcKeeper *keeper.Keeper
Module appmodule.AppModule
}

func ProvideModule(in ModuleInputs) ModuleOutputs {
// default to governance authority if not provided
authority := authtypes.NewModuleAddress(govtypes.ModuleName)
if in.Config.Authority != "" {
authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority)
}

keeper := keeper.NewKeeper(
in.Cdc,
in.Key,
in.LegacySubspace,
in.StakingKeeper,
in.UpgradeKeeper,
in.ScopedKeeper,
authority.String(),
)
m := NewAppModule(keeper)

return ModuleOutputs{IbcKeeper: keeper, Module: m}
}
15 changes: 0 additions & 15 deletions proto/ibc/core/module/v1/module.proto

This file was deleted.

0 comments on commit 98a354f

Please sign in to comment.