Skip to content

Commit

Permalink
Merge pull request #2822 from irisnet/dreamer/fix-ci
Browse files Browse the repository at this point in the history
feat: upgrade plan handler & update irismod
  • Loading branch information
taramakage authored Apr 3, 2023
2 parents 671b307 + aa80bc8 commit 1287312
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/BuildAndPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
platforms: linux/amd64,linux/arm64

# - name: Build irishub image
# run: source ~/.bashrc; sudo docker build -t irisnet/irishub:latest .
# - name: Login dockerhub
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ NetworkType := $(shell if [ -z ${NetworkType} ]; then echo "mainnet"; else echo
CURRENT_DIR = $(shell pwd)
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)

# default mainnet EVM_CHAIN_ID
EVM_CHAIN_ID ?= 6688

export GO111MODULE = on

# process build tags
Expand Down Expand Up @@ -100,9 +103,7 @@ install: check-evm-chain-id go.sum
@go install $(BUILD_FLAGS) ./cmd/iris

check-evm-chain-id:
ifeq ($(EVM_CHAIN_ID),)
@echo "EVM_CHAIN_ID is not set"; exit 1
endif
@echo "note: EVM_CHAIN_ID is $(EVM_CHAIN_ID)"

update-swagger-docs: statik proto-swagger-gen
$(BINDIR)/statik -src=lite/swagger-ui -dest=lite -f -m
Expand Down
13 changes: 11 additions & 2 deletions app/upgrades/v200/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/evmos/ethermint/x/feemarket"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

v1 "github.com/irisnet/irismod/modules/token/types/v1"

"github.com/irisnet/irishub/app/upgrades"
irisevm "github.com/irisnet/irishub/modules/evm"
)
Expand All @@ -39,11 +41,18 @@ func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upg
app.EvmKeeper.SetParams(ctx, evmParams)
app.FeeMarketKeeper.SetParams(ctx, generateFeemarketParams(ctx.BlockHeight()))

if err := evmToken.Validate(); err != nil {
//transfer token ownership
token, err := app.TokenKeeper.GetToken(ctx, evmToken.Symbol)
if err != nil {
return nil, err
}

if err := app.TokenKeeper.AddToken(ctx, evmToken); err != nil {
tokenExp, ok := token.(v1.Token)
if !ok {
return nil, fmt.Errorf("token is not v1.Token")
}
tokenExp.Owner = evmToken.Owner
if err := app.TokenKeeper.UpdateToken(ctx, tokenExp); err != nil {
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/irisnet/irismod v1.7.3-rc1.0.20230329054945-06f6c377ff67
github.com/irisnet/irismod v1.7.3-rc1.0.20230403030851-b6879675c673
github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mq
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/informalsystems/tendermint v0.34.26 h1:89XvVexAy62geGWxmDmdmmJvfindx+Su2oTuwfSWMeU=
github.com/informalsystems/tendermint v0.34.26/go.mod h1:q3uAZ/t5+MblQhFuHSd4flqaLDx7iUtWpwWbwvHAFhs=
github.com/irisnet/irismod v1.7.3-rc1.0.20230329054945-06f6c377ff67 h1:88WtwsywVXXnZ4qwGn5QnhJ7Huc9xlJ9Fi5pt05849w=
github.com/irisnet/irismod v1.7.3-rc1.0.20230329054945-06f6c377ff67/go.mod h1:B9WxUyCBkMRSaQ+LxXGKhyAPCXDaoXBv8/4T5SH1xR8=
github.com/irisnet/irismod v1.7.3-rc1.0.20230403030851-b6879675c673 h1:SeX7uK09rUyWrnJb+LGHjoZvx9zO1oUmzcAjfMdKlHk=
github.com/irisnet/irismod v1.7.3-rc1.0.20230403030851-b6879675c673/go.mod h1:B9WxUyCBkMRSaQ+LxXGKhyAPCXDaoXBv8/4T5SH1xR8=
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
Expand Down

0 comments on commit 1287312

Please # to comment.