diff --git a/CHANGELOG.md b/CHANGELOG.md index 48f18265b6a..23ae5527ddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * MsgExitPoolResponse: token_out field * [#1825](https://github.com/osmosis-labs/osmosis/pull/1825) Fixes Interchain Accounts (host side) by adding it to AppModuleBasics * [#1699](https://github.com/osmosis-labs/osmosis/pull/1699) Fixes bug in sig fig rounding on spot price queries for small values +* [#1994](https://github.com/osmosis-labs/osmosis/pull/1994) Removed bech32ibc module #### Golang API breaks diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index f563ae5ec6c..180fc6d2baf 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -46,10 +46,6 @@ import ( // IBC Transfer: Defines the "transfer" IBC port transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer" - "github.com/osmosis-labs/bech32-ibc/x/bech32ibc" - bech32ibckeeper "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/keeper" - bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" - bech32ics20keeper "github.com/osmosis-labs/bech32-ibc/x/bech32ics20/keeper" _ "github.com/osmosis-labs/osmosis/v7/client/docs/statik" owasm "github.com/osmosis-labs/osmosis/v7/wasmbinding" @@ -100,8 +96,6 @@ type AppKeepers struct { IBCKeeper *ibckeeper.Keeper ICAHostKeeper *icahostkeeper.Keeper TransferKeeper *ibctransferkeeper.Keeper - Bech32IBCKeeper *bech32ibckeeper.Keeper - Bech32ICS20Keeper *bech32ics20keeper.Keeper EvidenceKeeper *evidencekeeper.Keeper GAMMKeeper *gammkeeper.Keeper LockupKeeper *lockupkeeper.Keeper @@ -231,22 +225,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( AddRoute(ibctransfertypes.ModuleName, transferIBCModule) // Note: the sealing is done after creating wasmd and wiring that up - appKeepers.Bech32IBCKeeper = bech32ibckeeper.NewKeeper( - appKeepers.IBCKeeper.ChannelKeeper, appCodec, appKeepers.keys[bech32ibctypes.StoreKey], - appKeepers.TransferKeeper, - ) - - // TODO: Should we be passing this instead of bank in many places? - // Where do we want send coins to be cross-chain? - appKeepers.Bech32ICS20Keeper = bech32ics20keeper.NewKeeper( - appKeepers.IBCKeeper.ChannelKeeper, - appKeepers.BankKeeper, - appKeepers.TransferKeeper, - appKeepers.Bech32IBCKeeper, - appKeepers.TransferKeeper, - appCodec, - ) - // create evidence keeper with router // If evidence needs to be handled for the app, set routes in router here and seal appKeepers.EvidenceKeeper = evidencekeeper.NewKeeper( @@ -374,7 +352,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(*appKeepers.UpgradeKeeper)). AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)). AddRoute(poolincentivestypes.RouterKey, poolincentives.NewPoolIncentivesProposalHandler(*appKeepers.PoolIncentivesKeeper)). - AddRoute(bech32ibctypes.RouterKey, bech32ibc.NewBech32IBCProposalHandler(*appKeepers.Bech32IBCKeeper)). AddRoute(txfeestypes.RouterKey, txfees.NewUpdateFeeTokenProposalHandler(*appKeepers.TxFeesKeeper)). AddRoute(superfluidtypes.RouterKey, superfluid.NewSuperfluidProposalHandler(*appKeepers.SuperfluidKeeper, *appKeepers.EpochsKeeper)) @@ -539,7 +516,6 @@ func KVStoreKeys() []string { authzkeeper.StoreKey, txfeestypes.StoreKey, superfluidtypes.StoreKey, - bech32ibctypes.StoreKey, wasm.StoreKey, tokenfactorytypes.StoreKey, } diff --git a/app/keepers/modules.go b/app/keepers/modules.go index b0766bf1b6b..83af806ebdf 100644 --- a/app/keepers/modules.go +++ b/app/keepers/modules.go @@ -6,7 +6,6 @@ import ( transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer" ibc "github.com/cosmos/ibc-go/v3/modules/core" ibcclientclient "github.com/cosmos/ibc-go/v3/modules/core/02-client/client" - "github.com/osmosis-labs/bech32-ibc/x/bech32ibc" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" @@ -82,7 +81,6 @@ var AppModuleBasics = []module.AppModuleBasic{ epochs.AppModuleBasic{}, superfluid.AppModuleBasic{}, tokenfactory.AppModuleBasic{}, - bech32ibc.AppModuleBasic{}, wasm.AppModuleBasic{}, ica.AppModuleBasic{}, } diff --git a/app/modules.go b/app/modules.go index a78d320139a..a8d0900258f 100644 --- a/app/modules.go +++ b/app/modules.go @@ -8,9 +8,6 @@ import ( ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts" icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - "github.com/osmosis-labs/bech32-ibc/x/bech32ibc" - bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" - "github.com/osmosis-labs/bech32-ibc/x/bech32ics20" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" @@ -20,6 +17,7 @@ import ( vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/authz" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" + "github.com/cosmos/cosmos-sdk/x/bank" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" @@ -105,7 +103,7 @@ func appModules( ), auth.NewAppModule(appCodec, *app.AccountKeeper, nil), vesting.NewAppModule(*app.AccountKeeper, app.BankKeeper), - bech32ics20.NewAppModule(appCodec, *app.Bech32ICS20Keeper), + bank.NewAppModule(appCodec, *app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants), gov.NewAppModule(appCodec, *app.GovKeeper, app.AccountKeeper, app.BankKeeper), @@ -138,7 +136,6 @@ func appModules( app.EpochsKeeper, ), tokenfactory.NewAppModule(appCodec, *app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper), - bech32ibc.NewAppModule(appCodec, *app.Bech32IBCKeeper), } } @@ -175,7 +172,6 @@ func orderBeginBlockers() []string { tokenfactorytypes.ModuleName, // superfluid must come after distribution and epochs superfluidtypes.ModuleName, - bech32ibctypes.ModuleName, txfeestypes.ModuleName, wasm.ModuleName, } @@ -210,7 +206,6 @@ func OrderInitGenesis(allModuleNames []string) []string { upgradetypes.ModuleName, vestingtypes.ModuleName, ibctransfertypes.ModuleName, - bech32ibctypes.ModuleName, // comes after ibctransfertypes poolincentivestypes.ModuleName, superfluidtypes.ModuleName, tokenfactorytypes.ModuleName, diff --git a/app/upgrades/v5/upgrades.go b/app/upgrades/v5/upgrades.go index 851f9b0ba92..efb21a5c1f8 100644 --- a/app/upgrades/v5/upgrades.go +++ b/app/upgrades/v5/upgrades.go @@ -2,7 +2,7 @@ package v5 import ( ibcconnectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" + // bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -46,7 +46,7 @@ func CreateUpgradeHandler( // Override versions for authz & bech32ibctypes module as to not skip their // InitGenesis for txfees module, we will override txfees ourselves. delete(fromVM, authz.ModuleName) - delete(fromVM, bech32ibctypes.ModuleName) + // delete(fromVM, bech32ibctypes.ModuleName) newVM, err := mm.RunMigrations(ctx, configurator, fromVM) if err != nil { diff --git a/go.mod b/go.mod index 99b414416d5..2f7557701a7 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/ory/dockertest/v3 v3.9.1 - github.com/osmosis-labs/bech32-ibc v0.3.0-rc1 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.0 diff --git a/go.sum b/go.sum index 4f0b4409505..2b6732e6289 100644 --- a/go.sum +++ b/go.sum @@ -437,8 +437,8 @@ github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8c github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -1040,8 +1040,6 @@ github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4 github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= -github.com/osmosis-labs/bech32-ibc v0.3.0-rc1 h1:frHKHEdPfzoK2iMF2GeWKudLLzUXz+6GJcdZ/TMcs2k= -github.com/osmosis-labs/bech32-ibc v0.3.0-rc1/go.mod h1:X5/FZHMPL+B3ufuVyY2/koxVjd4hIwyTLjYP1DZwppQ= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220620200611-3e46ff7501a1 h1:DGOm5SJcKVmgUVN8of2u4jj3vxEhAYs/+e+XqsxcrnQ= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220620200611-3e46ff7501a1/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY= github.com/osmosis-labs/iavl v0.17.3-osmo-v7 h1:6KcADC/WhL7yDmNQxUIJt2XmzNt4FfRmq9gRke45w74= diff --git a/osmoutils/partialord/partialord_test.go b/osmoutils/partialord/partialord_test.go index 6de9edcd92d..1f8afd4e0c9 100644 --- a/osmoutils/partialord/partialord_test.go +++ b/osmoutils/partialord/partialord_test.go @@ -14,12 +14,11 @@ func TestAPI(t *testing.T) { moduleNames := []string{ "auth", "authz", "bank", "capabilities", "staking", "distribution", "epochs", "mint", "upgrades", "wasm", "ibc", - "ibctransfers", "bech32ibc", + "ibctransfers", } beginBlockOrd := partialord.NewPartialOrdering(moduleNames) beginBlockOrd.FirstElements("upgrades", "epochs", "capabilities") beginBlockOrd.After("ibctransfers", "ibc") - beginBlockOrd.After("bech32ibc", "ibctransfers") beginBlockOrd.Before("mint", "distribution") // This is purely just to test last functionality, doesn't make sense in context beginBlockOrd.LastElements("auth", "authz", "wasm") @@ -27,7 +26,7 @@ func TestAPI(t *testing.T) { totalOrd := beginBlockOrd.TotalOrdering() expTotalOrd := []string{ "upgrades", "epochs", "capabilities", - "bank", "staking", "mint", "ibc", "distribution", "ibctransfers", "bech32ibc", + "bank", "staking", "mint", "ibc", "distribution", "ibctransfers", "auth", "authz", "wasm", } require.Equal(t, expTotalOrd, totalOrd)