diff --git a/app/ante/ante.go b/app/ante/ante.go index 35a0b468a..e0b86cafb 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/signing" - tfmwKeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + tfmwKeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" ) // Link to default ante handler used by cosmos sdk: diff --git a/app/ante/ibc_ante.go b/app/ante/ibc_ante.go index a9a8c3edc..ebae1b5b7 100644 --- a/app/ante/ibc_ante.go +++ b/app/ante/ibc_ante.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - tfmwKeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + tfmwKeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" ) type IBCPermissionDecorator struct { diff --git a/app/app.go b/app/app.go index e1cd0e2ec..d1852da44 100644 --- a/app/app.go +++ b/app/app.go @@ -31,9 +31,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/vesting" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/bank" - bech32stakingmigration "github.com/notional-labs/centauri/v3/bech32-migration/staking" + bech32stakingmigration "github.com/notional-labs/centauri/v4/bech32-migration/staking" + + "github.com/notional-labs/centauri/v4/app/keepers" + v4 "github.com/notional-labs/centauri/v4/app/upgrades/v4" - "github.com/notional-labs/centauri/v3/app/keepers" // bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" @@ -82,34 +84,35 @@ import ( icq "github.com/strangelove-ventures/async-icq/v7" icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - reward "github.com/notional-labs/centauri/v3/app/upgrade/reward" - custombankmodule "github.com/notional-labs/centauri/v3/custom/bank" + custombankmodule "github.com/notional-labs/centauri/v4/custom/bank" "github.com/strangelove-ventures/packet-forward-middleware/v7/router" routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" alliancemodule "github.com/terra-money/alliance/x/alliance" alliancemoduleclient "github.com/terra-money/alliance/x/alliance/client" alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" - "github.com/notional-labs/centauri/v3/app/ante" - transfermiddleware "github.com/notional-labs/centauri/v3/x/transfermiddleware" - transfermiddlewaretypes "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/app/ante" + transfermiddleware "github.com/notional-labs/centauri/v4/x/transfermiddleware" + transfermiddlewaretypes "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" - ratelimitmodule "github.com/notional-labs/centauri/v3/x/ratelimit" - ratelimitmoduletypes "github.com/notional-labs/centauri/v3/x/ratelimit/types" + ratelimitmodule "github.com/notional-labs/centauri/v4/x/ratelimit" + ratelimitmoduletypes "github.com/notional-labs/centauri/v4/x/ratelimit/types" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - "github.com/notional-labs/centauri/v3/x/mint" - minttypes "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint" + minttypes "github.com/notional-labs/centauri/v4/x/mint/types" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - ibc_hooks "github.com/notional-labs/centauri/v3/x/ibc-hooks" - ibchookstypes "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" + ibc_hooks "github.com/notional-labs/centauri/v4/x/ibc-hooks" + ibchookstypes "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + upgrades "github.com/notional-labs/centauri/v4/app/upgrades" ) const ( @@ -126,6 +129,8 @@ var ( // of "EnableAllProposals" (takes precedence over ProposalsEnabled) // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 EnableSpecificProposals = "" + + Upgrades = []upgrades.Upgrade{v4.Upgrade} ) // GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to @@ -295,7 +300,7 @@ func NewCentauriApp( skipUpgradeHeights, homePath, ) - + app.setupUpgradeStoreLoaders() app.InitNormalKeepers( appCodec, cdc, @@ -463,6 +468,8 @@ func NewCentauriApp( app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.mm.RegisterServices(app.configurator) + app.setupUpgradeHandlers() + // create the simulation manager and define the order of the modules for deterministic simulations // app.sm = module.NewSimulationManager( // auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), @@ -523,9 +530,6 @@ func NewCentauriApp( } } - // app.ScopedMonitoringKeeper = scopedMonitoringKeeper - app.UpgradeKeeper.SetUpgradeHandler(reward.UpgradeName, reward.CreateUpgradeHandler(app.mm, app.configurator, app.TransferMiddlewareKeeper, app.MintKeeper)) - return app } @@ -664,3 +668,47 @@ func GetMaccPerms() map[string][]string { func (app *CentauriApp) SimulationManager() *module.SimulationManager { return app.sm } + +// configure store loader that checks if version == upgradeHeight and applies store upgrades +func (app *CentauriApp) setupUpgradeStoreLoaders() { + upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() + if err != nil { + panic(fmt.Sprintf("failed to read upgrade info from disk %s", err)) + } + + if app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + return + } + + currentHeight := app.CommitMultiStore().LastCommitID().Version + + if upgradeInfo.Height == currentHeight+1 { + app.customPreUpgradeHandler(upgradeInfo) + } + + for _, upgrade := range Upgrades { + if upgradeInfo.Name == upgrade.UpgradeName { + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &upgrade.StoreUpgrades)) + } + } +} + +func (app *CentauriApp) customPreUpgradeHandler(upgradeInfo upgradetypes.Plan) { + switch upgradeInfo.Name { + default: + } +} + +func (app *CentauriApp) setupUpgradeHandlers() { + for _, upgrade := range Upgrades { + app.UpgradeKeeper.SetUpgradeHandler( + upgrade.UpgradeName, + upgrade.CreateUpgradeHandler( + app.mm, + app.configurator, + app.BaseApp, + &app.AppKeepers, + ), + ) + } +} diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 49d5ba954..5c5db303f 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -21,7 +21,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/ibc-go/v7/testing/mock" - centauri "github.com/notional-labs/centauri/v3/app" + centauri "github.com/notional-labs/centauri/v4/app" "github.com/stretchr/testify/require" ) diff --git a/app/ibctesting/chain.go b/app/ibctesting/chain.go index 2619ccf4b..c61d29598 100644 --- a/app/ibctesting/chain.go +++ b/app/ibctesting/chain.go @@ -8,6 +8,8 @@ import ( "testing" "time" + ratelimitmodulekeeper "github.com/notional-labs/centauri/v4/x/ratelimit/keeper" + "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/tmhash" @@ -49,10 +51,9 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/cosmos/ibc-go/v7/testing/mock" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - centauri "github.com/notional-labs/centauri/v3/app" - "github.com/notional-labs/centauri/v3/app/ibctesting/simapp" - ratelimit "github.com/notional-labs/centauri/v3/x/ratelimit/keeper" - routerKeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + centauri "github.com/notional-labs/centauri/v4/app" + "github.com/notional-labs/centauri/v4/app/ibctesting/simapp" + routerKeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) @@ -617,7 +618,7 @@ func (chain *TestChain) TransferMiddleware() routerKeeper.Keeper { return chain.GetTestSupport().TransferMiddleware() } -func (chain *TestChain) RateLimit() ratelimit.Keeper { +func (chain *TestChain) RateLimit() ratelimitmodulekeeper.Keeper { return chain.GetTestSupport().RateLimit() } diff --git a/app/ibctesting/simapp/app.go b/app/ibctesting/simapp/app.go index ac27bb2c4..2ce90278c 100644 --- a/app/ibctesting/simapp/app.go +++ b/app/ibctesting/simapp/app.go @@ -90,9 +90,9 @@ import ( "github.com/gorilla/mux" // TODO: mint module not complete yet, - "github.com/notional-labs/centauri/v3/x/mint" - mintkeeper "github.com/notional-labs/centauri/v3/x/mint/keeper" - minttypes "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint" + mintkeeper "github.com/notional-labs/centauri/v4/x/mint/keeper" + minttypes "github.com/notional-labs/centauri/v4/x/mint/types" "github.com/rakyll/statik/fs" "github.com/spf13/cast" @@ -123,13 +123,13 @@ import ( wasm08 "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - simappparams "github.com/notional-labs/centauri/v3/app/ibctesting/simapp/params" - simappupgrades "github.com/notional-labs/centauri/v3/app/ibctesting/simapp/upgrades" - v6 "github.com/notional-labs/centauri/v3/app/ibctesting/simapp/upgrades/v6" - v7 "github.com/notional-labs/centauri/v3/app/ibctesting/simapp/upgrades/v7" - transfermiddleware "github.com/notional-labs/centauri/v3/x/transfermiddleware" - transfermiddlewarekeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" - transfermiddlewaretypes "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + simappparams "github.com/notional-labs/centauri/v4/app/ibctesting/simapp/params" + simappupgrades "github.com/notional-labs/centauri/v4/app/ibctesting/simapp/upgrades" + v6 "github.com/notional-labs/centauri/v4/app/ibctesting/simapp/upgrades/v6" + v7 "github.com/notional-labs/centauri/v4/app/ibctesting/simapp/upgrades/v7" + transfermiddleware "github.com/notional-labs/centauri/v4/x/transfermiddleware" + transfermiddlewarekeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" + transfermiddlewaretypes "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) const appName = "SimApp" diff --git a/app/ibctesting/simapp/encoding.go b/app/ibctesting/simapp/encoding.go index 9b487648e..fe48f7b94 100644 --- a/app/ibctesting/simapp/encoding.go +++ b/app/ibctesting/simapp/encoding.go @@ -3,7 +3,7 @@ package simapp import ( "github.com/cosmos/cosmos-sdk/std" - simappparams "github.com/notional-labs/centauri/v3/app/ibctesting/simapp/params" + simappparams "github.com/notional-labs/centauri/v4/app/ibctesting/simapp/params" ) // MakeTestEncodingConfig creates an EncodingConfig for testing. This function diff --git a/app/ibctesting/simapp/sim_test.go b/app/ibctesting/simapp/sim_test.go index d7aebdbd3..5c0a3ead5 100644 --- a/app/ibctesting/simapp/sim_test.go +++ b/app/ibctesting/simapp/sim_test.go @@ -28,7 +28,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - minttypes "github.com/notional-labs/centauri/v3/x/mint/types" + minttypes "github.com/notional-labs/centauri/v4/x/mint/types" "github.com/stretchr/testify/require" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index fdf21fce0..41edb1ae1 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -63,7 +63,7 @@ import ( icqkeeper "github.com/strangelove-ventures/async-icq/v7/keeper" icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - custombankkeeper "github.com/notional-labs/centauri/v3/custom/bank/keeper" + custombankkeeper "github.com/notional-labs/centauri/v4/custom/bank/keeper" "github.com/strangelove-ventures/packet-forward-middleware/v7/router" routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v7/router/keeper" @@ -73,19 +73,19 @@ import ( alliancemodulekeeper "github.com/terra-money/alliance/x/alliance/keeper" alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" - transfermiddleware "github.com/notional-labs/centauri/v3/x/transfermiddleware" - transfermiddlewarekeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" - transfermiddlewaretypes "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + transfermiddleware "github.com/notional-labs/centauri/v4/x/transfermiddleware" + transfermiddlewarekeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" + transfermiddlewaretypes "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" - ratelimitmodule "github.com/notional-labs/centauri/v3/x/ratelimit" - ratelimitmodulekeeper "github.com/notional-labs/centauri/v3/x/ratelimit/keeper" - ratelimitmoduletypes "github.com/notional-labs/centauri/v3/x/ratelimit/types" + ratelimitmodule "github.com/notional-labs/centauri/v4/x/ratelimit" + ratelimitmodulekeeper "github.com/notional-labs/centauri/v4/x/ratelimit/keeper" + ratelimitmoduletypes "github.com/notional-labs/centauri/v4/x/ratelimit/types" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - mintkeeper "github.com/notional-labs/centauri/v3/x/mint/keeper" - minttypes "github.com/notional-labs/centauri/v3/x/mint/types" + mintkeeper "github.com/notional-labs/centauri/v4/x/mint/keeper" + minttypes "github.com/notional-labs/centauri/v4/x/mint/types" "github.com/CosmWasm/wasmd/x/wasm" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -93,9 +93,9 @@ import ( wasm08Keeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" - ibc_hooks "github.com/notional-labs/centauri/v3/x/ibc-hooks" - ibchookskeeper "github.com/notional-labs/centauri/v3/x/ibc-hooks/keeper" - ibchookstypes "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" + ibc_hooks "github.com/notional-labs/centauri/v4/x/ibc-hooks" + ibchookskeeper "github.com/notional-labs/centauri/v4/x/ibc-hooks/keeper" + ibchookstypes "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" ) const ( diff --git a/app/keepers/keys.go b/app/keepers/keys.go index 12ecd782c..2683a27c5 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -26,14 +26,14 @@ import ( routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" - ibchookstypes "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" - transfermiddlewaretypes "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + ibchookstypes "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" + ratelimitmoduletypes "github.com/notional-labs/centauri/v4/x/ratelimit/types" + transfermiddlewaretypes "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" - minttypes "github.com/notional-labs/centauri/v3/x/mint/types" - ratelimitmoduletypes "github.com/notional-labs/centauri/v3/x/ratelimit/types" + minttypes "github.com/notional-labs/centauri/v4/x/mint/types" "github.com/CosmWasm/wasmd/x/wasm" wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" diff --git a/app/test_access.go b/app/test_access.go index 535702163..c1ca828d4 100644 --- a/app/test_access.go +++ b/app/test_access.go @@ -6,7 +6,6 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" @@ -16,8 +15,8 @@ import ( ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" wasm08 "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" - ratelimitKeeper "github.com/notional-labs/centauri/v3/x/ratelimit/keeper" - tfmdKeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + ratelimitkeeper "github.com/notional-labs/centauri/v4/x/ratelimit/keeper" + tfmdKeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" ) type TestSupport struct { @@ -86,6 +85,6 @@ func (s TestSupport) TransferMiddleware() tfmdKeeper.Keeper { return s.app.TransferMiddlewareKeeper } -func (s TestSupport) RateLimit() ratelimitKeeper.Keeper { +func (s TestSupport) RateLimit() ratelimitkeeper.Keeper { return s.app.RatelimitKeeper } diff --git a/app/test_helpers.go b/app/test_helpers.go index f7719e8d5..0f0cb67a8 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -35,7 +35,7 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - minttypes "github.com/notional-labs/centauri/v3/x/mint/types" + minttypes "github.com/notional-labs/centauri/v4/x/mint/types" "github.com/CosmWasm/wasmd/x/wasm" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" diff --git a/app/upgrade/centauri/constants.go b/app/upgrades/centauri/constants.go similarity index 100% rename from app/upgrade/centauri/constants.go rename to app/upgrades/centauri/constants.go diff --git a/app/upgrade/centauri/readme.md b/app/upgrades/centauri/readme.md similarity index 100% rename from app/upgrade/centauri/readme.md rename to app/upgrades/centauri/readme.md diff --git a/app/upgrade/centauri/upgrade.go b/app/upgrades/centauri/upgrade.go similarity index 88% rename from app/upgrade/centauri/upgrade.go rename to app/upgrades/centauri/upgrade.go index f7b9037e1..ce6260b21 100644 --- a/app/upgrade/centauri/upgrade.go +++ b/app/upgrades/centauri/upgrade.go @@ -16,10 +16,10 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - bech32authmigration "github.com/notional-labs/centauri/v3/bech32-migration/auth" - bech32govmigration "github.com/notional-labs/centauri/v3/bech32-migration/gov" - bech32slashingmigration "github.com/notional-labs/centauri/v3/bech32-migration/slashing" - bech32stakingmigration "github.com/notional-labs/centauri/v3/bech32-migration/staking" + bech32authmigration "github.com/notional-labs/centauri/v4/bech32-migration/auth" + bech32govmigration "github.com/notional-labs/centauri/v4/bech32-migration/gov" + bech32slashingmigration "github.com/notional-labs/centauri/v4/bech32-migration/slashing" + bech32stakingmigration "github.com/notional-labs/centauri/v4/bech32-migration/staking" ) func CreateUpgradeHandler( diff --git a/app/upgrade/reward/constants.go b/app/upgrades/reward/constants.go similarity index 100% rename from app/upgrade/reward/constants.go rename to app/upgrades/reward/constants.go diff --git a/app/upgrade/reward/upgrade.go b/app/upgrades/reward/upgrade.go similarity index 91% rename from app/upgrade/reward/upgrade.go rename to app/upgrades/reward/upgrade.go index cde43ed3e..461a99a9b 100644 --- a/app/upgrade/reward/upgrade.go +++ b/app/upgrades/reward/upgrade.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - mintkeeper "github.com/notional-labs/centauri/v3/x/mint/keeper" - tfmwkeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + mintkeeper "github.com/notional-labs/centauri/v4/x/mint/keeper" + tfmwkeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" ) var listAllowedRelayAddress = []string{ diff --git a/app/upgrades/types.go b/app/upgrades/types.go new file mode 100644 index 000000000..17780db22 --- /dev/null +++ b/app/upgrades/types.go @@ -0,0 +1,48 @@ +package upgrades + +import ( + types "github.com/cometbft/cometbft/proto/tendermint/types" + store "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/notional-labs/centauri/v4/app/keepers" +) + +// BaseAppParamManager defines an interrace that BaseApp is expected to fullfil +// that allows upgrade handlers to modify BaseApp parameters. +type BaseAppParamManager interface { + GetConsensusParams(ctx sdk.Context) *types.ConsensusParams + StoreConsensusParams(ctx sdk.Context, cp *types.ConsensusParams) +} + +// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal +// must have written, in order for the state migration to go smoothly. +// An upgrade must implement this struct, and then set it in the app.go. +// The app.go will then define the handler. +type Upgrade struct { + // Upgrade version name, for the upgrade handler, e.g. `v7` + UpgradeName string + + // CreateUpgradeHandler defines the function that creates an upgrade handler + CreateUpgradeHandler func(*module.Manager, module.Configurator, BaseAppParamManager, *keepers.AppKeepers) upgradetypes.UpgradeHandler + + // Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed. + StoreUpgrades store.StoreUpgrades +} + +// Fork defines a struct containing the requisite fields for a non-software upgrade proposal +// Hard Fork at a given height to implement. +// There is one time code that can be added for the start of the Fork, in `BeginForkLogic`. +// Any other change in the code should be height-gated, if the goal is to have old and new binaries +// to be compatible prior to the upgrade height. +type Fork struct { + // Upgrade version name, for the upgrade handler, e.g. `v7` + UpgradeName string + // height the upgrade occurs at + UpgradeHeight int64 + + // Function that runs some custom state transition code at the beginning of a fork. + BeginForkLogic func(ctx sdk.Context, keepers *keepers.AppKeepers) +} diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go new file mode 100644 index 000000000..2e021e767 --- /dev/null +++ b/app/upgrades/v4/constants.go @@ -0,0 +1,23 @@ +package v4 + +import ( + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + store "github.com/cosmos/cosmos-sdk/store/types" + "github.com/notional-labs/centauri/v4/app/upgrades" + ibchookstypes "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" + ratelimitmoduletypes "github.com/notional-labs/centauri/v4/x/ratelimit/types" +) + +const ( + // UpgradeName defines the on-chain upgrade name for the Centauri upgrade. + UpgradeName = "v4" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{wasmtypes.StoreKey, ibchookstypes.StoreKey, ratelimitmoduletypes.StoreKey}, + Deleted: []string{}, + }, +} diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go new file mode 100644 index 000000000..45f489ce1 --- /dev/null +++ b/app/upgrades/v4/upgrade.go @@ -0,0 +1,20 @@ +package v4 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/notional-labs/centauri/v4/app/keepers" + "github.com/notional-labs/centauri/v4/app/upgrades" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + bpm upgrades.BaseAppParamManager, + keepers *keepers.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return mm.RunMigrations(ctx, configurator, vm) + } +} diff --git a/bech32-migration/auth/auth.go b/bech32-migration/auth/auth.go index 4270b581c..89fabf2b8 100644 --- a/bech32-migration/auth/auth.go +++ b/bech32-migration/auth/auth.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/notional-labs/centauri/v3/bech32-migration/utils" + "github.com/notional-labs/centauri/v4/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/gov/gov.go b/bech32-migration/gov/gov.go index 41df3db58..be4006e3e 100644 --- a/bech32-migration/gov/gov.go +++ b/bech32-migration/gov/gov.go @@ -9,7 +9,7 @@ import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/notional-labs/centauri/v3/bech32-migration/utils" + "github.com/notional-labs/centauri/v4/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/slashing/slashing.go b/bech32-migration/slashing/slashing.go index f3ea5ea60..16473eeea 100644 --- a/bech32-migration/slashing/slashing.go +++ b/bech32-migration/slashing/slashing.go @@ -5,7 +5,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/notional-labs/centauri/v3/bech32-migration/utils" + "github.com/notional-labs/centauri/v4/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/staking/staking.go b/bech32-migration/staking/staking.go index 1e06fe65d..88742fe6d 100644 --- a/bech32-migration/staking/staking.go +++ b/bech32-migration/staking/staking.go @@ -5,7 +5,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/notional-labs/centauri/v3/bech32-migration/utils" + "github.com/notional-labs/centauri/v4/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/cmd/centaurid/cmd/genaccounts.go b/cmd/centaurid/cmd/genaccounts.go index b3b727856..3121f98af 100644 --- a/cmd/centaurid/cmd/genaccounts.go +++ b/cmd/centaurid/cmd/genaccounts.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/notional-labs/centauri/v3/bech32-migration/utils" + "github.com/notional-labs/centauri/v4/bech32-migration/utils" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" diff --git a/cmd/centaurid/cmd/root.go b/cmd/centaurid/cmd/root.go index 50f53fb2c..a4d0bd3e9 100644 --- a/cmd/centaurid/cmd/root.go +++ b/cmd/centaurid/cmd/root.go @@ -33,8 +33,8 @@ import ( genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/notional-labs/centauri/v3/app" - // "github.com/notional-labs/centauri/v3/app/params" + "github.com/notional-labs/centauri/v4/app" + // "github.com/notional-labs/centauri/v4/app/params" // this line is used by starport scaffolding # stargate/root/import ) diff --git a/cmd/centaurid/main.go b/cmd/centaurid/main.go index dc20261e7..58b8996e5 100644 --- a/cmd/centaurid/main.go +++ b/cmd/centaurid/main.go @@ -5,9 +5,9 @@ import ( svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/notional-labs/centauri/v3/app" - cmd "github.com/notional-labs/centauri/v3/cmd/centaurid/cmd" - cmdcfg "github.com/notional-labs/centauri/v3/cmd/centaurid/config" + "github.com/notional-labs/centauri/v4/app" + cmd "github.com/notional-labs/centauri/v4/cmd/centaurid/cmd" + cmdcfg "github.com/notional-labs/centauri/v4/cmd/centaurid/config" ) func main() { diff --git a/custom/bank/bank_test.go b/custom/bank/bank_test.go index 34b448385..252b03ce5 100644 --- a/custom/bank/bank_test.go +++ b/custom/bank/bank_test.go @@ -7,7 +7,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - customibctesting "github.com/notional-labs/centauri/v3/app/ibctesting" + customibctesting "github.com/notional-labs/centauri/v4/app/ibctesting" "github.com/stretchr/testify/suite" ) diff --git a/custom/bank/keeper/keeper.go b/custom/bank/keeper/keeper.go index f5a6c8392..2e5b54536 100644 --- a/custom/bank/keeper/keeper.go +++ b/custom/bank/keeper/keeper.go @@ -10,11 +10,11 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - banktypes "github.com/notional-labs/centauri/v3/custom/bank/types" + banktypes "github.com/notional-labs/centauri/v4/custom/bank/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - transfermiddlewarekeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + transfermiddlewarekeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" alliancekeeper "github.com/terra-money/alliance/x/alliance/keeper" alliancetypes "github.com/terra-money/alliance/x/alliance/types" diff --git a/custom/bank/module.go b/custom/bank/module.go index 848f0a2ee..431fffbb9 100644 --- a/custom/bank/module.go +++ b/custom/bank/module.go @@ -10,7 +10,7 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" - custombankkeeper "github.com/notional-labs/centauri/v3/custom/bank/keeper" + custombankkeeper "github.com/notional-labs/centauri/v4/custom/bank/keeper" ) // AppModule wraps around the bank module and the bank keeper to return the right total supply ignoring bonded tokens diff --git a/go.mod b/go.mod index d2174cad1..162e6317f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/notional-labs/centauri/v3 +module github.com/notional-labs/centauri/v4 go 1.19 @@ -188,7 +188,7 @@ replace ( // ibc-go with wasm client github.com/cosmos/ibc-go/v7 => github.com/notional-labs/ibc-go/v7 v7.0.0-wasm-client - github.com/strangelove-ventures/packet-forward-middleware/v7 => github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230615054050-5523db83e69a + github.com/strangelove-ventures/packet-forward-middleware/v7 => github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230719072346-7acf9377aac3 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/terra-money/alliance => github.com/notional-labs/alliance v1.0.1-0.20230523105704-66dba9499c01 diff --git a/go.sum b/go.sum index 2c21732b5..763bf1b3f 100644 --- a/go.sum +++ b/go.sum @@ -772,8 +772,8 @@ github.com/notional-labs/alliance v1.0.1-0.20230523105704-66dba9499c01 h1:koCsoc github.com/notional-labs/alliance v1.0.1-0.20230523105704-66dba9499c01/go.mod h1:GFQ8TsXDMTpu7kif0Dwddz6rxazy0ZJQHfN38ZmAodI= github.com/notional-labs/ibc-go/v7 v7.0.0-wasm-client h1:oQxReLXp48oCIW1zYL+YYg7Nr3L5ginxzJjWXSk1zHM= github.com/notional-labs/ibc-go/v7 v7.0.0-wasm-client/go.mod h1:ISHo/Qitjtvj2svGmttaZv03zVXmS+uqvUyF9kFqlI0= -github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230615054050-5523db83e69a h1:MMb5U1UydbPHdQGmvLBy5/KgX9NUb8tY6H5aJvXXKjI= -github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230615054050-5523db83e69a/go.mod h1:9C/cvYi6C0YqCc7sh0Eyv+pRYCXnt1DkJ1AN9q555Hw= +github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230719072346-7acf9377aac3 h1:LBK82QivQaiycoKZPGDV3fJL1KTWy8AAoerEGUno/60= +github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230719072346-7acf9377aac3/go.mod h1:L7nnQ9rEoYLyulE9M/zhcBcHDWqMMSQn8cf4yY5A+T8= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= diff --git a/x/ibc-hooks/client/cli/query.go b/x/ibc-hooks/client/cli/query.go index fe9140878..0350649e4 100644 --- a/x/ibc-hooks/client/cli/query.go +++ b/x/ibc-hooks/client/cli/query.go @@ -7,10 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/keeper" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/keeper" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" ) func indexRunCmd(cmd *cobra.Command, args []string) error { diff --git a/x/ibc-hooks/keeper/keeper.go b/x/ibc-hooks/keeper/keeper.go index cc02434d0..26edf4b4a 100644 --- a/x/ibc-hooks/keeper/keeper.go +++ b/x/ibc-hooks/keeper/keeper.go @@ -7,7 +7,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" ) type ( diff --git a/x/ibc-hooks/module.go b/x/ibc-hooks/module.go index 82aa83727..7a03b9407 100644 --- a/x/ibc-hooks/module.go +++ b/x/ibc-hooks/module.go @@ -10,8 +10,8 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/client/cli" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/client/cli" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/ibc-hooks/relay_test.go b/x/ibc-hooks/relay_test.go index 32ea3ab01..996f3d2a0 100644 --- a/x/ibc-hooks/relay_test.go +++ b/x/ibc-hooks/relay_test.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - customibctesting "github.com/notional-labs/centauri/v3/app/ibctesting" - ibchookskeeper "github.com/notional-labs/centauri/v3/x/ibc-hooks/keeper" + customibctesting "github.com/notional-labs/centauri/v4/app/ibctesting" + ibchookskeeper "github.com/notional-labs/centauri/v4/x/ibc-hooks/keeper" "github.com/stretchr/testify/suite" ) diff --git a/x/ibc-hooks/wasm_hook.go b/x/ibc-hooks/wasm_hook.go index f68b28082..a475fb5de 100644 --- a/x/ibc-hooks/wasm_hook.go +++ b/x/ibc-hooks/wasm_hook.go @@ -10,8 +10,8 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/keeper" - "github.com/notional-labs/centauri/v3/x/ibc-hooks/types" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/keeper" + "github.com/notional-labs/centauri/v4/x/ibc-hooks/types" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/mint/abci.go b/x/mint/abci.go index c2439f140..c48d68482 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/mint/keeper" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/keeper" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // BeginBlocker mints new tokens for the previous block. diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go index 31d809745..a9713bc5b 100644 --- a/x/mint/client/cli/query.go +++ b/x/mint/client/cli/query.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // GetQueryCmd returns the cli query commands for the minting module. diff --git a/x/mint/client/cli/tx.go b/x/mint/client/cli/tx.go index 730b5694c..435980406 100644 --- a/x/mint/client/cli/tx.go +++ b/x/mint/client/cli/tx.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" "github.com/spf13/cobra" ) diff --git a/x/mint/keeper/genesis.go b/x/mint/keeper/genesis.go index 65ba199c2..9c923c992 100644 --- a/x/mint/keeper/genesis.go +++ b/x/mint/keeper/genesis.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // InitGenesis new mint genesis diff --git a/x/mint/keeper/grpc_query.go b/x/mint/keeper/grpc_query.go index b46e00700..9602beab9 100644 --- a/x/mint/keeper/grpc_query.go +++ b/x/mint/keeper/grpc_query.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index 9e8efa15f..eecd683d7 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // Keeper of the mint store diff --git a/x/mint/keeper/msg_server.go b/x/mint/keeper/msg_server.go index 508cdf3f1..3a14411be 100644 --- a/x/mint/keeper/msg_server.go +++ b/x/mint/keeper/msg_server.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/mint/module.go b/x/mint/module.go index 83187e98b..1a154dc78 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -15,10 +15,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/notional-labs/centauri/v3/x/mint/client/cli" - "github.com/notional-labs/centauri/v3/x/mint/keeper" - "github.com/notional-labs/centauri/v3/x/mint/simulation" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/client/cli" + "github.com/notional-labs/centauri/v4/x/mint/keeper" + "github.com/notional-labs/centauri/v4/x/mint/simulation" + "github.com/notional-labs/centauri/v4/x/mint/types" ) var ( diff --git a/x/mint/simulation/decoder.go b/x/mint/simulation/decoder.go index cdccb95a9..5853e8151 100644 --- a/x/mint/simulation/decoder.go +++ b/x/mint/simulation/decoder.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/x/mint/simulation/decoder_test.go b/x/mint/simulation/decoder_test.go index 3eebc2c29..1a05a4862 100644 --- a/x/mint/simulation/decoder_test.go +++ b/x/mint/simulation/decoder_test.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/notional-labs/centauri/v3/x/mint/simulation" - centauriminttypes "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/simulation" + centauriminttypes "github.com/notional-labs/centauri/v4/x/mint/types" ) func TestDecodeStore(t *testing.T) { diff --git a/x/mint/simulation/genesis.go b/x/mint/simulation/genesis.go index bbc6529e6..6c5d9d1a5 100644 --- a/x/mint/simulation/genesis.go +++ b/x/mint/simulation/genesis.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // Simulation parameter constants diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go index 87ef5335f..3f8ed9974 100644 --- a/x/mint/simulation/genesis_test.go +++ b/x/mint/simulation/genesis_test.go @@ -13,8 +13,8 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/mint" - "github.com/notional-labs/centauri/v3/x/mint/simulation" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/simulation" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. diff --git a/x/mint/simulation/proposals.go b/x/mint/simulation/proposals.go index 309fd38d9..cf2aaa720 100644 --- a/x/mint/simulation/proposals.go +++ b/x/mint/simulation/proposals.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/types" ) // Simulation operation weights constants diff --git a/x/mint/simulation/proposals_test.go b/x/mint/simulation/proposals_test.go index cf0528974..14ae52098 100644 --- a/x/mint/simulation/proposals_test.go +++ b/x/mint/simulation/proposals_test.go @@ -10,8 +10,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/notional-labs/centauri/v3/x/mint/simulation" - "github.com/notional-labs/centauri/v3/x/mint/types" + "github.com/notional-labs/centauri/v4/x/mint/simulation" + "github.com/notional-labs/centauri/v4/x/mint/types" ) func TestProposalMsgs(t *testing.T) { diff --git a/x/ratelimit/client/cli/query.go b/x/ratelimit/client/cli/query.go index 69acddd48..6b0ff3087 100644 --- a/x/ratelimit/client/cli/query.go +++ b/x/ratelimit/client/cli/query.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) // GetQueryCmd returns the cli query commands for this module. diff --git a/x/ratelimit/client/cli/tx.go b/x/ratelimit/client/cli/tx.go index f47ed51ad..38a11e5ba 100644 --- a/x/ratelimit/client/cli/tx.go +++ b/x/ratelimit/client/cli/tx.go @@ -3,7 +3,7 @@ package cli import ( "fmt" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" "github.com/spf13/cobra" ) diff --git a/x/ratelimit/ibc_middleware.go b/x/ratelimit/ibc_middleware.go index e38b7f458..1d2513936 100644 --- a/x/ratelimit/ibc_middleware.go +++ b/x/ratelimit/ibc_middleware.go @@ -3,7 +3,7 @@ package ratelimit import ( "fmt" - "github.com/notional-labs/centauri/v3/x/ratelimit/keeper" + "github.com/notional-labs/centauri/v4/x/ratelimit/keeper" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/ratelimit/keeper/abci.go b/x/ratelimit/keeper/abci.go index 608f80278..8e3aace1b 100644 --- a/x/ratelimit/keeper/abci.go +++ b/x/ratelimit/keeper/abci.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) // BeginBlocker of epochs module. diff --git a/x/ratelimit/keeper/epoch.go b/x/ratelimit/keeper/epoch.go index 57a781d78..7b788668f 100644 --- a/x/ratelimit/keeper/epoch.go +++ b/x/ratelimit/keeper/epoch.go @@ -6,7 +6,7 @@ import ( "github.com/gogo/protobuf/proto" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/ratelimit/keeper/genesis.go b/x/ratelimit/keeper/genesis.go index 1d6722445..c6da50481 100644 --- a/x/ratelimit/keeper/genesis.go +++ b/x/ratelimit/keeper/genesis.go @@ -5,7 +5,7 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { diff --git a/x/ratelimit/keeper/grpc_query.go b/x/ratelimit/keeper/grpc_query.go index 77e7c6ae2..7798e6a40 100644 --- a/x/ratelimit/keeper/grpc_query.go +++ b/x/ratelimit/keeper/grpc_query.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/ratelimit/keeper/keeper.go b/x/ratelimit/keeper/keeper.go index 5265b6a34..0962b61b5 100644 --- a/x/ratelimit/keeper/keeper.go +++ b/x/ratelimit/keeper/keeper.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" - tfmwkeeper "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" + tfmwkeeper "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" ) type Keeper struct { diff --git a/x/ratelimit/keeper/msg_server.go b/x/ratelimit/keeper/msg_server.go index b53e6b986..ece478fde 100644 --- a/x/ratelimit/keeper/msg_server.go +++ b/x/ratelimit/keeper/msg_server.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/ratelimit/keeper/packet.go b/x/ratelimit/keeper/packet.go index c9cd19fa3..3bfca4baa 100644 --- a/x/ratelimit/keeper/packet.go +++ b/x/ratelimit/keeper/packet.go @@ -14,7 +14,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) type RateLimitedPacketInfo struct { diff --git a/x/ratelimit/keeper/rate_limit.go b/x/ratelimit/keeper/rate_limit.go index 41e9187b3..ca3b09c9d 100644 --- a/x/ratelimit/keeper/rate_limit.go +++ b/x/ratelimit/keeper/rate_limit.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" ) // Get the rate limit byte key built from the denom and channelId diff --git a/x/ratelimit/module.go b/x/ratelimit/module.go index ab0dcb8f9..6c51bc925 100644 --- a/x/ratelimit/module.go +++ b/x/ratelimit/module.go @@ -14,9 +14,9 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/notional-labs/centauri/v3/x/ratelimit/client/cli" - "github.com/notional-labs/centauri/v3/x/ratelimit/keeper" - "github.com/notional-labs/centauri/v3/x/ratelimit/types" + "github.com/notional-labs/centauri/v4/x/ratelimit/client/cli" + "github.com/notional-labs/centauri/v4/x/ratelimit/keeper" + "github.com/notional-labs/centauri/v4/x/ratelimit/types" "github.com/spf13/cobra" ) diff --git a/x/ratelimit/relay_test.go b/x/ratelimit/relay_test.go index c55b4d702..50d9ec1b4 100644 --- a/x/ratelimit/relay_test.go +++ b/x/ratelimit/relay_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - customibctesting "github.com/notional-labs/centauri/v3/app/ibctesting" - ratelimittypes "github.com/notional-labs/centauri/v3/x/ratelimit/types" + customibctesting "github.com/notional-labs/centauri/v4/app/ibctesting" + ratelimittypes "github.com/notional-labs/centauri/v4/x/ratelimit/types" "github.com/stretchr/testify/suite" ) diff --git a/x/transfermiddleware/client/cli/cli.go b/x/transfermiddleware/client/cli/cli.go index 624adc6a1..01e9a86f4 100644 --- a/x/transfermiddleware/client/cli/cli.go +++ b/x/transfermiddleware/client/cli/cli.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" "github.com/spf13/cobra" ) diff --git a/x/transfermiddleware/client/cli/tx.go b/x/transfermiddleware/client/cli/tx.go index 979780724..6ef982dc8 100644 --- a/x/transfermiddleware/client/cli/tx.go +++ b/x/transfermiddleware/client/cli/tx.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/version" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" "github.com/spf13/cobra" ) diff --git a/x/transfermiddleware/ibc_ante_test.go b/x/transfermiddleware/ibc_ante_test.go index 6b2c7eca4..8009f1ac0 100644 --- a/x/transfermiddleware/ibc_ante_test.go +++ b/x/transfermiddleware/ibc_ante_test.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/ibc-go/v7/modules/core/exported" wasmkeeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" - customibctesting "github.com/notional-labs/centauri/v3/app/ibctesting" + customibctesting "github.com/notional-labs/centauri/v4/app/ibctesting" "github.com/stretchr/testify/suite" ) diff --git a/x/transfermiddleware/ibc_middleware.go b/x/transfermiddleware/ibc_middleware.go index 0b8809f84..1df5eb7d6 100644 --- a/x/transfermiddleware/ibc_middleware.go +++ b/x/transfermiddleware/ibc_middleware.go @@ -10,7 +10,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" ) var _ porttypes.Middleware = &IBCMiddleware{} diff --git a/x/transfermiddleware/keeper/abci.go b/x/transfermiddleware/keeper/abci.go index 4c45d2be5..b5811a40f 100644 --- a/x/transfermiddleware/keeper/abci.go +++ b/x/transfermiddleware/keeper/abci.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) // BeginBlocker of epochs module. diff --git a/x/transfermiddleware/keeper/genesis.go b/x/transfermiddleware/keeper/genesis.go index 680a36ab2..84639e543 100644 --- a/x/transfermiddleware/keeper/genesis.go +++ b/x/transfermiddleware/keeper/genesis.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) // TODO: add init genesis logic diff --git a/x/transfermiddleware/keeper/genesis_test.go b/x/transfermiddleware/keeper/genesis_test.go index c532151e3..984cb3aca 100644 --- a/x/transfermiddleware/keeper/genesis_test.go +++ b/x/transfermiddleware/keeper/genesis_test.go @@ -3,8 +3,8 @@ package keeper_test import ( "testing" - helpers "github.com/notional-labs/centauri/v3/app/helpers" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + helpers "github.com/notional-labs/centauri/v4/app/helpers" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" "github.com/stretchr/testify/require" ) diff --git a/x/transfermiddleware/keeper/grpc_query.go b/x/transfermiddleware/keeper/grpc_query.go index 52609b9fd..696c09815 100644 --- a/x/transfermiddleware/keeper/grpc_query.go +++ b/x/transfermiddleware/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) func (k Keeper) ParaTokenInfo(c context.Context, req *types.QueryParaTokenInfoRequest) (*types.QueryParaTokenInfoResponse, error) { diff --git a/x/transfermiddleware/keeper/ics4wrapper.go b/x/transfermiddleware/keeper/ics4wrapper.go index 969221dae..65b9d8d92 100644 --- a/x/transfermiddleware/keeper/ics4wrapper.go +++ b/x/transfermiddleware/keeper/ics4wrapper.go @@ -11,7 +11,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) func (keeper Keeper) hasParachainIBCTokenInfo(ctx sdk.Context, nativeDenom string) bool { diff --git a/x/transfermiddleware/keeper/keeper.go b/x/transfermiddleware/keeper/keeper.go index 9a2700076..f24bc8b34 100644 --- a/x/transfermiddleware/keeper/keeper.go +++ b/x/transfermiddleware/keeper/keeper.go @@ -13,7 +13,7 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) type Keeper struct { diff --git a/x/transfermiddleware/keeper/msg_server.go b/x/transfermiddleware/keeper/msg_server.go index 7c83cd854..e089d4a1d 100644 --- a/x/transfermiddleware/keeper/msg_server.go +++ b/x/transfermiddleware/keeper/msg_server.go @@ -8,7 +8,7 @@ import ( "cosmossdk.io/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/transfermiddleware/keeper/params.go b/x/transfermiddleware/keeper/params.go index 47370718d..49755cbfc 100644 --- a/x/transfermiddleware/keeper/params.go +++ b/x/transfermiddleware/keeper/params.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { diff --git a/x/transfermiddleware/keeper/relay.go b/x/transfermiddleware/keeper/relay.go index f7861cd36..c7494af3e 100644 --- a/x/transfermiddleware/keeper/relay.go +++ b/x/transfermiddleware/keeper/relay.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" ) func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData) error { diff --git a/x/transfermiddleware/module.go b/x/transfermiddleware/module.go index 2e5aafcde..92aadb7df 100644 --- a/x/transfermiddleware/module.go +++ b/x/transfermiddleware/module.go @@ -14,9 +14,9 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/client/cli" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/keeper" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/client/cli" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/keeper" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" "github.com/spf13/cobra" ) diff --git a/x/transfermiddleware/pfm_test.go b/x/transfermiddleware/pfm_test.go index 05dde85e2..af7a3784f 100644 --- a/x/transfermiddleware/pfm_test.go +++ b/x/transfermiddleware/pfm_test.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - customibctesting "github.com/notional-labs/centauri/v3/app/ibctesting" + customibctesting "github.com/notional-labs/centauri/v4/app/ibctesting" "github.com/stretchr/testify/suite" ) diff --git a/x/transfermiddleware/relay_test.go b/x/transfermiddleware/relay_test.go index 158d8672f..bf610025f 100644 --- a/x/transfermiddleware/relay_test.go +++ b/x/transfermiddleware/relay_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - customibctesting "github.com/notional-labs/centauri/v3/app/ibctesting" + customibctesting "github.com/notional-labs/centauri/v4/app/ibctesting" "github.com/stretchr/testify/suite" ) diff --git a/x/transfermiddleware/types/info_test.go b/x/transfermiddleware/types/info_test.go index 2823385b0..52010caa0 100644 --- a/x/transfermiddleware/types/info_test.go +++ b/x/transfermiddleware/types/info_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "github.com/notional-labs/centauri/v3/x/transfermiddleware/types" + "github.com/notional-labs/centauri/v4/x/transfermiddleware/types" "github.com/stretchr/testify/require" )