Skip to content

Commit

Permalink
feat: update module name to v12 (#2672)
Browse files Browse the repository at this point in the history
* bump to v12

* feat: add upgrade handler for v12
  • Loading branch information
yaruwangway authored Jul 27, 2023
1 parent 04e869e commit 581ef19
Show file tree
Hide file tree
Showing 50 changed files with 118 additions and 76 deletions.
4 changes: 2 additions & 2 deletions ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"

gaiaerrors "github.com/cosmos/gaia/v11/types/errors"
gaiafeeante "github.com/cosmos/gaia/v11/x/globalfee/ante"
gaiaerrors "github.com/cosmos/gaia/v12/types/errors"
gaiafeeante "github.com/cosmos/gaia/v12/x/globalfee/ante"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
2 changes: 1 addition & 1 deletion ante/gov_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

gaiaerrors "github.com/cosmos/gaia/v11/types/errors"
gaiaerrors "github.com/cosmos/gaia/v12/types/errors"
)

// initial deposit must be greater than or equal to 10% of the minimum deposit
Expand Down
6 changes: 3 additions & 3 deletions ante/gov_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/cosmos/gaia/v11/ante"
gaiaapp "github.com/cosmos/gaia/v11/app"
gaiahelpers "github.com/cosmos/gaia/v11/app/helpers"
"github.com/cosmos/gaia/v12/ante"
gaiaapp "github.com/cosmos/gaia/v12/app"
gaiahelpers "github.com/cosmos/gaia/v12/app/helpers"
)

var (
Expand Down
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

gaiaante "github.com/cosmos/gaia/v11/ante"
"github.com/cosmos/gaia/v11/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v11/app/upgrades"
v11 "github.com/cosmos/gaia/v11/app/upgrades/v11"
"github.com/cosmos/gaia/v11/x/globalfee"
gaiaante "github.com/cosmos/gaia/v12/ante"
"github.com/cosmos/gaia/v12/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v12/app/params"
"github.com/cosmos/gaia/v12/app/upgrades"
v11 "github.com/cosmos/gaia/v12/app/upgrades/v11"
"github.com/cosmos/gaia/v12/x/globalfee"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

gaia "github.com/cosmos/gaia/v11/app"
gaiahelpers "github.com/cosmos/gaia/v11/app/helpers"
gaia "github.com/cosmos/gaia/v12/app"
gaiahelpers "github.com/cosmos/gaia/v12/app/helpers"
)

type EmptyAppOptions struct{}
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gaia
import (
"github.com/cosmos/cosmos-sdk/std"

"github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v12/app/params"
)

// MakeTestEncodingConfig creates an EncodingConfig for testing. This function
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaiaapp "github.com/cosmos/gaia/v11/app"
gaiaapp "github.com/cosmos/gaia/v12/app"
)

// SimAppChainID hardcoded chainID for simulation
Expand Down
2 changes: 1 addition & 1 deletion app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/x/globalfee"
"github.com/cosmos/gaia/v12/x/globalfee"
)

type AppKeepers struct {
Expand Down
4 changes: 2 additions & 2 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

gaiaappparams "github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v11/x/globalfee"
gaiaappparams "github.com/cosmos/gaia/v12/app/params"
"github.com/cosmos/gaia/v12/x/globalfee"
)

var maccPerms = map[string][]string{
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaia "github.com/cosmos/gaia/v11/app"
gaia "github.com/cosmos/gaia/v12/app"
)

// AppStateFn returns the initial application state using a genesis or the simulation parameters.
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

gaia "github.com/cosmos/gaia/v11/app"
gaia "github.com/cosmos/gaia/v12/app"
)

// SetupSimulation creates the config, db (levelDB), temporary directory and logger for
Expand Down
8 changes: 4 additions & 4 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
simulation2 "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"

gaia "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/app/helpers"
"github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v11/app/sim"
gaia "github.com/cosmos/gaia/v12/app"
"github.com/cosmos/gaia/v12/app/helpers"
"github.com/cosmos/gaia/v12/app/params"
"github.com/cosmos/gaia/v12/app/sim"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/app/keepers"
"github.com/cosmos/gaia/v12/app/keepers"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v10/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v10

import (
"github.com/cosmos/gaia/v11/app/upgrades"
"github.com/cosmos/gaia/v12/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v10/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/app/keepers"
"github.com/cosmos/gaia/v12/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v11/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v11

import (
"github.com/cosmos/gaia/v11/app/upgrades"
"github.com/cosmos/gaia/v12/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v11/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/app/keepers"
"github.com/cosmos/gaia/v12/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
15 changes: 15 additions & 0 deletions app/upgrades/v12/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v12

import (
"github.com/cosmos/gaia/v12/app/upgrades"
)

const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v12"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
}
27 changes: 27 additions & 0 deletions app/upgrades/v12/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package v12

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/cosmos/gaia/v12/app/keepers"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("Starting module migrations...")

vm, err := mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return vm, err
}

ctx.Logger().Info("Upgrade complete")
return vm, err
}
}
2 changes: 1 addition & 1 deletion app/upgrades/v7/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v11/app/upgrades"
"github.com/cosmos/gaia/v12/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v7/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/app/keepers"
"github.com/cosmos/gaia/v12/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v8/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package v8
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v11/app/upgrades"
"github.com/cosmos/gaia/v11/x/globalfee"
"github.com/cosmos/gaia/v12/app/upgrades"
"github.com/cosmos/gaia/v12/x/globalfee"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v8/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/app/keepers"
"github.com/cosmos/gaia/v12/app/keepers"
)

func FixBankMetadata(ctx sdk.Context, keepers *keepers.AppKeepers) error {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v9/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v11/app/upgrades"
"github.com/cosmos/gaia/v12/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v9/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v11/app/keepers"
"github.com/cosmos/gaia/v12/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaiad/cmd/bech32_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/spf13/cobra"

addressutil "github.com/cosmos/gaia/v11/pkg/address"
addressutil "github.com/cosmos/gaia/v12/pkg/address"
)

var flagBech32Prefix = "prefix"
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/crisis"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"

gaia "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/app/params"
gaia "github.com/cosmos/gaia/v12/app"
"github.com/cosmos/gaia/v12/app/params"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v12/app"
"github.com/cosmos/gaia/v12/cmd/gaiad/cmd"
)

func TestRootCmdConfig(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v12/app"
"github.com/cosmos/gaia/v12/cmd/gaiad/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/cosmos/gaia/v11
module github.com/cosmos/gaia/v12

go 1.20

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaia "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/app/params"
gaia "github.com/cosmos/gaia/v12/app"
"github.com/cosmos/gaia/v12/app/params"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_vesting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/gaia/v11/x/globalfee/ante"
"github.com/cosmos/gaia/v12/x/globalfee/ante"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

globfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types"
globfeetypes "github.com/cosmos/gaia/v12/x/globalfee/types"
)

func getGenDoc(path string) (*tmtypes.GenesisDoc, error) {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/cosmos/gaia/v11/x/globalfee/types"
"github.com/cosmos/gaia/v12/x/globalfee/types"
)

func queryGaiaTx(endpoint, txHash string) error {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaia "github.com/cosmos/gaia/v11/app"
gaia "github.com/cosmos/gaia/v12/app"
)

//nolint:unused
Expand Down
2 changes: 1 addition & 1 deletion tests/ics/interchain_security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cosmos/interchain-security/v2/tests/integration"
icstestingutils "github.com/cosmos/interchain-security/v2/testutil/ibc_testing"

gaiaApp "github.com/cosmos/gaia/v11/app"
gaiaApp "github.com/cosmos/gaia/v12/app"
)

func TestCCVTestSuite(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion x/globalfee/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package globalfee

import (
"github.com/cosmos/gaia/v11/x/globalfee/types"
"github.com/cosmos/gaia/v12/x/globalfee/types"
)

const (
Expand Down
Loading

0 comments on commit 581ef19

Please sign in to comment.