Skip to content

Commit

Permalink
feat: upgrade to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Nov 29, 2024
1 parent d10f84b commit 6418780
Show file tree
Hide file tree
Showing 78 changed files with 224 additions and 227 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=iris \
-X github.com/cosmos/cosmos-sdk/version.AppName=iris \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X github.com/irisnet/irishub/v3/types.EIP155ChainID=$(EVM_CHAIN_ID) \
-X github.com/irisnet/irishub/v4/types.EIP155ChainID=$(EVM_CHAIN_ID) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)"

ifeq ($(WITH_CLEVELDB),yes)
Expand Down Expand Up @@ -198,7 +198,7 @@ lint: golangci-lint
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lite/statik/statik.go" -not -path "*.pb.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lite/statik/statik.go" -not -path "*.pb.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lite/statik/statik.go" -not -path "*.pb.go" | xargs goimports -w -local github.com/irisnet/irishub/v3
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lite/statik/statik.go" -not -path "*.pb.go" | xargs goimports -w -local github.com/irisnet/irishub/v4

benchmark:
@go test -mod=readonly -bench=. ./...
Expand Down
2 changes: 1 addition & 1 deletion app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
oraclekeeper "mods.irisnet.org/modules/oracle/keeper"
tokenkeeper "mods.irisnet.org/modules/token/keeper"

guardiankeeper "github.com/irisnet/irishub/v3/modules/guardian/keeper"
guardiankeeper "github.com/irisnet/irishub/v4/modules/guardian/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ import (

srvflags "github.com/evmos/ethermint/server/flags"

irishubante "github.com/irisnet/irishub/v3/app/ante"
"github.com/irisnet/irishub/v3/app/keepers"
"github.com/irisnet/irishub/v3/app/params"
"github.com/irisnet/irishub/v3/app/rpc"
"github.com/irisnet/irishub/v3/client/lite"
iristypes "github.com/irisnet/irishub/v3/types"
irishubante "github.com/irisnet/irishub/v4/app/ante"
"github.com/irisnet/irishub/v4/app/keepers"
"github.com/irisnet/irishub/v4/app/params"
"github.com/irisnet/irishub/v4/app/rpc"
"github.com/irisnet/irishub/v4/client/lite"
iristypes "github.com/irisnet/irishub/v4/types"
)

var (
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 app
import (
enccodec "github.com/evmos/ethermint/encoding/codec"

"github.com/irisnet/irishub/v3/app/params"
"github.com/irisnet/irishub/v4/app/params"
)

// RegisterEncodingConfig registers concrete types on codec
Expand Down
2 changes: 1 addition & 1 deletion app/genesis.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app

import (
"github.com/irisnet/irishub/v3/types"
"github.com/irisnet/irishub/v4/types"
)

// NewDefaultGenesisState generates the default state for the application.
Expand Down
14 changes: 7 additions & 7 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ import (
tokentypes "mods.irisnet.org/modules/token/types"
tokenv1 "mods.irisnet.org/modules/token/types/v1"

guardiankeeper "github.com/irisnet/irishub/v3/modules/guardian/keeper"
guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v3/modules/internft"
mintkeeper "github.com/irisnet/irishub/v3/modules/mint/keeper"
minttypes "github.com/irisnet/irishub/v3/modules/mint/types"
iristypes "github.com/irisnet/irishub/v3/types"
"github.com/irisnet/irishub/v3/wrapper"
guardiankeeper "github.com/irisnet/irishub/v4/modules/guardian/keeper"
guardiantypes "github.com/irisnet/irishub/v4/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/internft"
mintkeeper "github.com/irisnet/irishub/v4/modules/mint/keeper"
minttypes "github.com/irisnet/irishub/v4/modules/mint/types"
iristypes "github.com/irisnet/irishub/v4/types"
"github.com/irisnet/irishub/v4/wrapper"
)

// AppKeepers defines a structure used to consolidate all
Expand Down
4 changes: 2 additions & 2 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import (
tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types"
tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host"

guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
minttypes "github.com/irisnet/irishub/v3/modules/mint/types"
guardiantypes "github.com/irisnet/irishub/v4/modules/guardian/types"
minttypes "github.com/irisnet/irishub/v4/modules/mint/types"
)

func (appKeepers *AppKeepers) genStoreKeys() {
Expand Down
12 changes: 6 additions & 6 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ import (
nfttransfer "github.com/bianjieai/nft-transfer"
ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types"

irisappparams "github.com/irisnet/irishub/v3/app/params"
irisevm "github.com/irisnet/irishub/v3/modules/evm"
"github.com/irisnet/irishub/v3/modules/guardian"
guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v3/modules/mint"
minttypes "github.com/irisnet/irishub/v3/modules/mint/types"
irisappparams "github.com/irisnet/irishub/v4/app/params"
irisevm "github.com/irisnet/irishub/v4/modules/evm"
"github.com/irisnet/irishub/v4/modules/guardian"
guardiantypes "github.com/irisnet/irishub/v4/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/mint"
minttypes "github.com/irisnet/irishub/v4/modules/mint/types"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion app/rpc/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

ethermint "github.com/evmos/ethermint/types"

"github.com/irisnet/irishub/v3/app/keepers"
"github.com/irisnet/irishub/v4/app/keepers"
)

var _ authtypes.QueryServer = authQueryServer{}
Expand Down
2 changes: 1 addition & 1 deletion app/rpc/override.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

"github.com/irisnet/irishub/v3/app/keepers"
"github.com/irisnet/irishub/v4/app/keepers"
)

var overrideModules = map[string]overrideHandler{
Expand Down
4 changes: 2 additions & 2 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
tokentypes "mods.irisnet.org/modules/token/types"
"github.com/stretchr/testify/require"

"github.com/irisnet/irishub/v3/app/params"
iristypes "github.com/irisnet/irishub/v3/types"
"github.com/irisnet/irishub/v4/app/params"
iristypes "github.com/irisnet/irishub/v4/types"

dbm "github.com/cometbft/cometbft-db"
abci "github.com/cometbft/cometbft/abci/types"
Expand Down
8 changes: 4 additions & 4 deletions app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (

upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/irisnet/irishub/v3/app/upgrades"
v200 "github.com/irisnet/irishub/v3/app/upgrades/v200"
v210 "github.com/irisnet/irishub/v3/app/upgrades/v210"
v300 "github.com/irisnet/irishub/v3/app/upgrades/v300"
"github.com/irisnet/irishub/v4/app/upgrades"
v200 "github.com/irisnet/irishub/v4/app/upgrades/v200"
v210 "github.com/irisnet/irishub/v4/app/upgrades/v210"
v300 "github.com/irisnet/irishub/v4/app/upgrades/v300"
)

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

"github.com/irisnet/irishub/v3/app/keepers"
"github.com/irisnet/irishub/v4/app/keepers"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v200/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
etherminttypes "github.com/evmos/ethermint/x/evm/types"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/irisnet/irishub/v3/types"
"github.com/irisnet/irishub/v4/types"
)

// NOTE: Before the release of irishub 2.0.0, the configuration in this file must be modified
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v200/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/evmos/ethermint/x/feemarket"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/irisnet/irishub/v3/app/upgrades"
irisevm "github.com/irisnet/irishub/v3/modules/evm"
"github.com/irisnet/irishub/v4/app/upgrades"
irisevm "github.com/irisnet/irishub/v4/modules/evm"
)

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

ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types"

"github.com/irisnet/irishub/v3/app/upgrades"
"github.com/irisnet/irishub/v4/app/upgrades"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v300/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"

"github.com/irisnet/irishub/v3/app/upgrades"
"github.com/irisnet/irishub/v4/app/upgrades"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
2 changes: 1 addition & 1 deletion client/lite/swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

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

_ "github.com/irisnet/irishub/v3/client/lite/statik"
_ "github.com/irisnet/irishub/v4/client/lite/statik"
)

// RegisterSwaggerAPI registers swagger route with API Server
Expand Down
2 changes: 1 addition & 1 deletion cmd/iris/cmd/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

"github.com/irisnet/irishub/v3/app/params"
"github.com/irisnet/irishub/v4/app/params"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/iris/cmd/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/input"
"github.com/cosmos/cosmos-sdk/client/keys"

"github.com/irisnet/irishub/v3/client/keystore"
"github.com/irisnet/irishub/v4/client/keystore"
)

// Commands registers a sub-tree of commands to interact with
Expand Down
6 changes: 3 additions & 3 deletions cmd/iris/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
ethermintserver "github.com/evmos/ethermint/server"
servercfg "github.com/evmos/ethermint/server/config"

"github.com/irisnet/irishub/v3/app"
"github.com/irisnet/irishub/v3/app/params"
iristypes "github.com/irisnet/irishub/v3/types"
"github.com/irisnet/irishub/v4/app"
"github.com/irisnet/irishub/v4/app/params"
iristypes "github.com/irisnet/irishub/v4/types"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
4 changes: 2 additions & 2 deletions cmd/iris/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import (
servicetypes "mods.irisnet.org/modules/service/types"
tokentypesv1 "mods.irisnet.org/modules/token/types/v1"

guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
iristypes "github.com/irisnet/irishub/v3/types"
guardiantypes "github.com/irisnet/irishub/v4/modules/guardian/types"
iristypes "github.com/irisnet/irishub/v4/types"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions cmd/iris/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

_ "github.com/irisnet/irishub/v3/client/lite/statik"
"github.com/irisnet/irishub/v3/cmd/iris/cmd"
"github.com/irisnet/irishub/v3/types"
_ "github.com/irisnet/irishub/v4/client/lite/statik"
"github.com/irisnet/irishub/v4/cmd/iris/cmd"
"github.com/irisnet/irishub/v4/types"
)

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/irisnet/irishub/v3
module github.com/irisnet/irishub/v4

go 1.21

Expand Down
8 changes: 4 additions & 4 deletions modules/guardian/client/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/suite"

guardiancli "github.com/irisnet/irishub/v3/modules/guardian/client/cli"
guardiantestutil "github.com/irisnet/irishub/v3/modules/guardian/client/testutil"
guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
apptestutil "github.com/irisnet/irishub/v3/testutil"
guardiancli "github.com/irisnet/irishub/v4/modules/guardian/client/cli"
guardiantestutil "github.com/irisnet/irishub/v4/modules/guardian/client/testutil"
guardiantypes "github.com/irisnet/irishub/v4/modules/guardian/types"
apptestutil "github.com/irisnet/irishub/v4/testutil"
)

var privKey cryptotypes.PrivKey
Expand Down
2 changes: 1 addition & 1 deletion modules/guardian/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"

"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

// GetQueryCmd returns the cli query commands for the guardian module.
Expand Down
2 changes: 1 addition & 1 deletion modules/guardian/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/version"
"github.com/spf13/cobra"

"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

// NewTxCmd returns the transaction commands for the guardian module.
Expand Down
4 changes: 2 additions & 2 deletions modules/guardian/client/testutil/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/cosmos-sdk/testutil/network"

guardiancli "github.com/irisnet/irishub/v3/modules/guardian/client/cli"
apptestutil "github.com/irisnet/irishub/v3/testutil"
guardiancli "github.com/irisnet/irishub/v4/modules/guardian/client/cli"
apptestutil "github.com/irisnet/irishub/v4/testutil"
)

// CreateSuperExec creates a new super
Expand Down
4 changes: 2 additions & 2 deletions modules/guardian/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

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

"github.com/irisnet/irishub/v3/modules/guardian/keeper"
"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/keeper"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

// InitGenesis stores genesis data
Expand Down
8 changes: 4 additions & 4 deletions modules/guardian/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/irisnet/irishub/v3/modules/guardian"
"github.com/irisnet/irishub/v3/modules/guardian/keeper"
"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v3/testutil"
"github.com/irisnet/irishub/v4/modules/guardian"
"github.com/irisnet/irishub/v4/modules/guardian/keeper"
"github.com/irisnet/irishub/v4/modules/guardian/types"
"github.com/irisnet/irishub/v4/testutil"
)

type TestSuite struct {
Expand Down
4 changes: 2 additions & 2 deletions modules/guardian/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/irisnet/irishub/v3/modules/guardian/keeper"
"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/keeper"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

// NewHandler returns a handler for all "guardian" type messages.
Expand Down
2 changes: 1 addition & 1 deletion modules/guardian/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"

"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

var _ types.QueryServer = Keeper{}
Expand Down
2 changes: 1 addition & 1 deletion modules/guardian/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/testutil/testdata"

"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

func (suite *KeeperTestSuite) TestGRPCQuerySupers() {
Expand Down
2 changes: 1 addition & 1 deletion modules/guardian/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v4/modules/guardian/types"
)

// Keeper of the guardian store
Expand Down
6 changes: 3 additions & 3 deletions modules/guardian/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/irisnet/irishub/v3/modules/guardian/keeper"
"github.com/irisnet/irishub/v3/modules/guardian/types"
"github.com/irisnet/irishub/v3/testutil"
"github.com/irisnet/irishub/v4/modules/guardian/keeper"
"github.com/irisnet/irishub/v4/modules/guardian/types"
"github.com/irisnet/irishub/v4/testutil"
)

var (
Expand Down
Loading

0 comments on commit 6418780

Please sign in to comment.