diff --git a/app/app.go b/app/app.go index a5df2033..e6c137c3 100644 --- a/app/app.go +++ b/app/app.go @@ -7,8 +7,6 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" - alliancemodule "github.com/terra-money/alliance/x/alliance" - alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" "io" "os" "path/filepath" @@ -213,7 +211,6 @@ var ( ibctransfermiddleware.AppModuleBasic{}, circuit.AppModuleBasic{}, wasm08.AppModuleBasic{}, - alliancemodule.AppModuleBasic{}, // this line is used by starport scaffolding # stargate/app/moduleBasic ) @@ -397,7 +394,6 @@ func NewComposableApp( icaModule, ratelimitModule, circuit.NewAppModule(appCodec, app.CircuitKeeper), - alliancemodule.NewAppModule(appCodec, app.AllianceKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry, app.GetSubspace(alliancemoduletypes.ModuleName)), // this line is used by starport scaffolding # stargate/app/appModule ) @@ -446,7 +442,6 @@ func NewComposableApp( stakingmiddlewaretypes.ModuleName, ibctransfermiddlewaretypes.ModuleName, wasm08types.ModuleName, - alliancemoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/beginBlockers ) @@ -483,7 +478,6 @@ func NewComposableApp( stakingmiddlewaretypes.ModuleName, ibctransfermiddlewaretypes.ModuleName, wasm08types.ModuleName, - alliancemoduletypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -524,7 +518,6 @@ func NewComposableApp( stakingmiddlewaretypes.ModuleName, ibctransfermiddlewaretypes.ModuleName, wasm08types.ModuleName, - alliancemoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis ) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 35e2e9c6..440e06a2 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -3,7 +3,6 @@ package keepers import ( "fmt" alliancemodulekeeper "github.com/terra-money/alliance/x/alliance/keeper" - alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" "math" "path/filepath" "strings" @@ -281,21 +280,11 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(appKeepers.keys[feegrant.StoreKey]), appKeepers.AccountKeeper) appKeepers.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, runtime.NewKVStoreService(appKeepers.keys[upgradetypes.StoreKey]), appCodec, homePath, bApp, govModAddress) - appKeepers.AllianceKeeper = alliancemodulekeeper.NewKeeper( - appCodec, - runtime.NewKVStoreService(appKeepers.keys[alliancemoduletypes.StoreKey]), - appKeepers.AccountKeeper, - appKeepers.BankKeeper, - appKeepers.StakingKeeper, - appKeepers.DistrKeeper, - authtypes.FeeCollectorName, - govModAddress, - ) - appKeepers.BankKeeper.RegisterKeepers(appKeepers.AllianceKeeper, appKeepers.StakingKeeper) + appKeepers.BankKeeper.RegisterKeepers(appKeepers.AccountKeeper, appKeepers.StakingKeeper) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks appKeepers.StakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks(), appKeepers.AllianceKeeper.StakingHooks()), + stakingtypes.NewMultiStakingHooks(appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks()), ) // ... other modules keepers @@ -602,7 +591,6 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac paramsKeeper.Subspace(transfermiddlewaretypes.ModuleName).WithKeyTable(transfermiddlewaretypes.ParamKeyTable()) paramsKeeper.Subspace(stakingmiddlewaretypes.ModuleName) paramsKeeper.Subspace(ibctransfermiddlewaretypes.ModuleName) - paramsKeeper.Subspace(alliancemoduletypes.ModuleName).WithKeyTable(alliancemoduletypes.ParamKeyTable()) return paramsKeeper } diff --git a/app/keepers/keys.go b/app/keepers/keys.go index 370a0530..353b7d6b 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -6,8 +6,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" - // bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" evidencetypes "cosmossdk.io/x/evidence/types" @@ -66,7 +64,6 @@ func (appKeepers *AppKeepers) GenerateKeys() { ibcexported.StoreKey, ibchookstypes.StoreKey, icahosttypes.StoreKey, ratelimitmoduletypes.StoreKey, txBoundaryTypes.StoreKey, - alliancemoduletypes.StoreKey, ) // Define transient store keys diff --git a/custom/bank/keeper/keeper.go b/custom/bank/keeper/keeper.go index ace6a932..d918a217 100644 --- a/custom/bank/keeper/keeper.go +++ b/custom/bank/keeper/keeper.go @@ -7,11 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" accountkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - banktypes "github.com/notional-labs/composable/v6/custom/bank/types" - alliancekeeper "github.com/terra-money/alliance/x/alliance/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" + banktypes "github.com/notional-labs/composable/v6/custom/bank/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -22,7 +20,7 @@ type Keeper struct { bankkeeper.BaseKeeper tfmk banktypes.TransferMiddlewareKeeper sk banktypes.StakingKeeper - ak alliancekeeper.Keeper + ak accountkeeper.AccountKeeper } var _ bankkeeper.Keeper = Keeper{} @@ -39,12 +37,12 @@ func NewBaseKeeper( keeper := Keeper{ BaseKeeper: bankkeeper.NewBaseKeeper(cdc, storeService, ak, blockedAddrs, authority, logger), tfmk: tfmk, - ak: alliancekeeper.Keeper{}, + ak: ak, } return keeper } -func (k *Keeper) RegisterKeepers(ak alliancekeeper.Keeper, sk banktypes.StakingKeeper) { +func (k *Keeper) RegisterKeepers(ak accountkeeper.AccountKeeper, sk banktypes.StakingKeeper) { k.ak = ak k.sk = sk } diff --git a/go.mod b/go.mod index 6cff1465..9951ab70 100644 --- a/go.mod +++ b/go.mod @@ -24,12 +24,12 @@ require ( github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 + github.com/terra-money/alliance v0.4.3 golang.org/x/tools v0.18.0 google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c google.golang.org/grpc v1.62.1 gotest.tools/v3 v3.5.1 mvdan.cc/gofumpt v0.4.0 - github.com/terra-money/alliance v0.4.3 ) require github.com/cometbft/cometbft-db v0.11.0 // indirect @@ -115,7 +115,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-hclog v1.6.2 // indirect - github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-metrics v0.5.3 github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect