Skip to content

Commit

Permalink
chore(sdk): up version to v0.46.14 (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
kioqq authored Jul 19, 2023
1 parent 1eb2641 commit 7b47fa6
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
DIFF_TAG=$(shell git rev-list --tags="v*" --max-count=1 --not $(shell git rev-list --tags="v*" "HEAD..origin"))
DEFAULT_TAG=$(shell git rev-list --tags="v*" --max-count=1)
# VERSION ?= $(shell echo $(shell git describe --tags $(or $(DIFF_TAG), $(DEFAULT_TAG))) | sed 's/^v//')
VERSION := "1.4.1"
VERSION := "1.4.2"
TMVERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::')
COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true
Expand Down
12 changes: 11 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ import (
v131 "github.com/haqq-network/haqq/app/upgrades/v1.3.1"
v140 "github.com/haqq-network/haqq/app/upgrades/v1.4.0"
v141 "github.com/haqq-network/haqq/app/upgrades/v1.4.1"
v142 "github.com/haqq-network/haqq/app/upgrades/v1.4.2"
)

func init() {
Expand All @@ -168,7 +169,7 @@ func init() {
const (
// Name defines the application binary name
Name = "haqqd"
UpgradeName = "v1.4.0"
UpgradeName = "v1.4.2"
MainnetChainID = "haqq_11235"
)

Expand Down Expand Up @@ -1091,6 +1092,15 @@ func (app *Haqq) setupUpgradeHandlers() {
),
)

// v1.4.2 Security upgrade
app.UpgradeKeeper.SetUpgradeHandler(
v142.UpgradeName,
v142.CreateUpgradeHandler(
app.mm,
app.configurator,
),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/v1.4.2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package v142

const (
// UpgradeName is the shared upgrade plan name for mainnet and testnet
UpgradeName = "v1.4.2"
)
20 changes: 20 additions & 0 deletions app/upgrades/v1.4.2/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v142

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

// CreateUpgradeHandler creates an SDK upgrade handler for v1.4.2
func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger()
logger.Info("run migration v1.4.2")

return mm.RunMigrations(ctx, configurator, vm)
}
}
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ require (
cosmossdk.io/math v1.0.0-beta.6
github.com/armon/go-metrics v0.4.1
github.com/cosmos/cosmos-proto v1.0.0-beta.3
github.com/cosmos/cosmos-sdk v0.46.10
github.com/cosmos/gogoproto v1.4.6
github.com/cosmos/cosmos-sdk v0.46.14
github.com/cosmos/ibc-go/v5 v5.2.1
github.com/ethereum/go-ethereum v1.10.26
github.com/evmos/ethermint v0.20.0
Expand All @@ -19,6 +18,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/onsi/ginkgo/v2 v2.9.0
github.com/onsi/gomega v1.27.2
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
Expand Down Expand Up @@ -61,6 +61,7 @@ require (
github.com/confio/ics23/go v0.9.0 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogoproto v1.4.6 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/iavl v0.19.5 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
Expand Down Expand Up @@ -143,7 +144,6 @@ require (
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
Expand All @@ -162,7 +162,6 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
Expand Down

1 comment on commit 7b47fa6

@Shaniforex1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gffgcvgfb gf gf gfgs df sdfdf jytgb gftf ytfvgh ft tf trvt

Please sign in to comment.