Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: change path from v2 to v3 #2912

Merged
merged 3 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/TestUnit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: '^1.18' # The Go version to download (if necessary) and use.
go-version: '^1.21' # The Go version to download (if necessary) and use.
- run: make test-unit
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Build image: docker build -t irisnet/irishub:v2.1.0 --build-arg EVM_CHAIN_ID=6688 .
#
FROM golang:1.19.13-alpine3.18 as builder
FROM golang:1.21-alpine as builder

ARG EVM_CHAIN_ID

Expand Down
10 changes: 5 additions & 5 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/v2/types.EIP155ChainID=$(EVM_CHAIN_ID) \
-X github.com/irisnet/irishub/v3/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 @@ -193,13 +193,13 @@ test-cover:

lint: golangci-lint
golangci-lint run
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./lite/statik/statik.go" -not -path "*.pb.go" | xargs gofmt -d -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lite/statik/statik.go" -not -path "*.pb.go" | xargs gofmt -d -s
go mod verify

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./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 "./lite/statik/statik.go" -not -path "*.pb.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./lite/statik/statik.go" -not -path "*.pb.go" | xargs goimports -w -local github.com/irisnet/irishub/v2
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

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 "github.com/irisnet/irismod/modules/oracle/keeper"
tokenkeeper "github.com/irisnet/irismod/modules/token/keeper"

guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper"
guardiankeeper "github.com/irisnet/irishub/v3/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/v2/app/ante"
"github.com/irisnet/irishub/v2/app/keepers"
"github.com/irisnet/irishub/v2/app/params"
"github.com/irisnet/irishub/v2/app/rpc"
"github.com/irisnet/irishub/v2/client/lite"
iristypes "github.com/irisnet/irishub/v2/types"
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"
)

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/v2/app/params"
"github.com/irisnet/irishub/v3/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/v2/types"
"github.com/irisnet/irishub/v3/types"
)

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

guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper"
guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types"
"github.com/irisnet/irishub/v2/modules/internft"
mintkeeper "github.com/irisnet/irishub/v2/modules/mint/keeper"
minttypes "github.com/irisnet/irishub/v2/modules/mint/types"
iristypes "github.com/irisnet/irishub/v2/types"
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"
)

// 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/v2/modules/guardian/types"
minttypes "github.com/irisnet/irishub/v2/modules/mint/types"
guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
minttypes "github.com/irisnet/irishub/v3/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/v2/app/params"
irisevm "github.com/irisnet/irishub/v2/modules/evm"
"github.com/irisnet/irishub/v2/modules/guardian"
guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types"
"github.com/irisnet/irishub/v2/modules/mint"
minttypes "github.com/irisnet/irishub/v2/modules/mint/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"
)

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/v2/app/keepers"
"github.com/irisnet/irishub/v3/app/keepers"
)

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

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

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

iristypes "github.com/irisnet/irishub/v2/types"
iristypes "github.com/irisnet/irishub/v3/types"

dbm "github.com/cometbft/cometbft-db"
abci "github.com/cometbft/cometbft/abci/types"
Expand Down Expand Up @@ -314,7 +314,7 @@ func TestAppImportExport(t *testing.T) {
func TestAppSimulationAfterImport(t *testing.T) {
config := simcli.NewConfigFromFlags()
config.ChainID = AppChainID
encfg := RegisterEncodingConfig()
encfg := RegisterEncodingConfig()

db, dir, logger, skip, err := simtestutil.SetupSimulation(
config,
Expand Down Expand Up @@ -439,7 +439,7 @@ func TestAppStateDeterminism(t *testing.T) {
numSeeds := 3
numTimesToRunPerSeed := 5
appHashList := make([]json.RawMessage, numTimesToRunPerSeed)
encfg := RegisterEncodingConfig()
encfg := RegisterEncodingConfig()

for i := 0; i < numSeeds; i++ {
config.Seed = rand.Int63()
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/v2/app/upgrades"
v200 "github.com/irisnet/irishub/v2/app/upgrades/v200"
v210 "github.com/irisnet/irishub/v2/app/upgrades/v210"
v300 "github.com/irisnet/irishub/v2/app/upgrades/v300"
"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"
)

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/v2/app/keepers"
"github.com/irisnet/irishub/v3/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/v2/types"
"github.com/irisnet/irishub/v3/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/v2/app/upgrades"
irisevm "github.com/irisnet/irishub/v2/modules/evm"
"github.com/irisnet/irishub/v3/app/upgrades"
irisevm "github.com/irisnet/irishub/v3/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/v2/app/upgrades"
"github.com/irisnet/irishub/v3/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/v2/app/upgrades"
"github.com/irisnet/irishub/v3/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/v2/client/lite/statik"
_ "github.com/irisnet/irishub/v3/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/v2/app/params"
"github.com/irisnet/irishub/v3/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/v2/client/keystore"
"github.com/irisnet/irishub/v3/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/v2/app"
"github.com/irisnet/irishub/v2/app/params"
iristypes "github.com/irisnet/irishub/v2/types"
"github.com/irisnet/irishub/v3/app"
"github.com/irisnet/irishub/v3/app/params"
iristypes "github.com/irisnet/irishub/v3/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 @@ -45,8 +45,8 @@ import (
servicetypes "github.com/irisnet/irismod/modules/service/types"
tokentypesv1 "github.com/irisnet/irismod/modules/token/types/v1"

guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types"
iristypes "github.com/irisnet/irishub/v2/types"
guardiantypes "github.com/irisnet/irishub/v3/modules/guardian/types"
iristypes "github.com/irisnet/irishub/v3/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/v2/client/lite/statik"
"github.com/irisnet/irishub/v2/cmd/iris/cmd"
"github.com/irisnet/irishub/v2/types"
_ "github.com/irisnet/irishub/v3/client/lite/statik"
"github.com/irisnet/irishub/v3/cmd/iris/cmd"
"github.com/irisnet/irishub/v3/types"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/irisnet/irishub/v2
module github.com/irisnet/irishub/v3

go 1.19
go 1.21

require (
github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0
Expand Down
Loading
Loading