Skip to content

Commit

Permalink
Merge pull request #283 from persistenceOne/release/v10.4.0
Browse files Browse the repository at this point in the history
Release v10.4.0
  • Loading branch information
kruspy authored Jan 29, 2024
2 parents 696ed7d + b62730f commit 5d80064
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 107 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ import (

"github.com/persistenceOne/persistenceCore/v10/app/keepers"
"github.com/persistenceOne/persistenceCore/v10/app/upgrades"
v10_3_0 "github.com/persistenceOne/persistenceCore/v10/app/upgrades/v10.3.0"
v10_4_0 "github.com/persistenceOne/persistenceCore/v10/app/upgrades/v10.4.0"
)

var (
DefaultNodeHome string
Upgrades = []upgrades.Upgrade{v10_3_0.Upgrade}
Upgrades = []upgrades.Upgrade{v10_4_0.Upgrade}
ModuleBasics = module.NewBasicManager(keepers.AppModuleBasics...)
)

Expand Down
20 changes: 20 additions & 0 deletions app/upgrades/v10.4.0/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v10_4_0

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

"github.com/persistenceOne/persistenceCore/v10/app/upgrades"
)

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

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{},
},
}
42 changes: 42 additions & 0 deletions app/upgrades/v10.4.0/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package v10_4_0

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/persistenceOne/persistenceCore/v10/app/upgrades"
)

func CreateUpgradeHandler(args upgrades.UpgradeHandlerArgs) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("running upgrade handler")

for _, hc := range args.Keepers.LiquidStakeIBCKeeper.GetAllHostChains(ctx) {
switch hc.ChainId {
case "cosmoshub-4":
upperLimit, _ := sdk.NewDecFromStr("1.01")
lowerLimit, _ := sdk.NewDecFromStr("0.80")
hc.Params.UpperCValueLimit = upperLimit
hc.Params.LowerCValueLimit = lowerLimit
args.Keepers.LiquidStakeIBCKeeper.SetHostChain(ctx, hc)

case "osmosis-1":
upperLimit, _ := sdk.NewDecFromStr("1.01")
lowerLimit, _ := sdk.NewDecFromStr("0.97")
hc.Params.UpperCValueLimit = upperLimit
hc.Params.LowerCValueLimit = lowerLimit
args.Keepers.LiquidStakeIBCKeeper.SetHostChain(ctx, hc)

default:
upperLimit, _ := sdk.NewDecFromStr("1.01")
lowerLimit, _ := sdk.NewDecFromStr("0.80")
hc.Params.UpperCValueLimit = upperLimit
hc.Params.LowerCValueLimit = lowerLimit
args.Keepers.LiquidStakeIBCKeeper.SetHostChain(ctx, hc)
}
}

return args.ModuleManager.RunMigrations(ctx, args.Configurator, vm)
}
}
68 changes: 34 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ go 1.21

require (
cosmossdk.io/api v0.3.1
cosmossdk.io/errors v1.0.0
cosmossdk.io/math v1.1.2
cosmossdk.io/errors v1.0.1
cosmossdk.io/math v1.2.0
cosmossdk.io/tools/rosetta v0.2.1
github.com/CosmWasm/wasmd v0.40.2
github.com/CosmWasm/wasmvm v1.2.4
github.com/cometbft/cometbft v0.37.2
github.com/cometbft/cometbft-db v0.8.0
github.com/cometbft/cometbft-db v0.9.1
github.com/cosmos/cosmos-sdk v0.47.3
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0-20230523193151-73dea436e53f
github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230706221116-a1e480497c12
github.com/cosmos/ibc-go/v7 v7.1.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/mux v1.8.1
github.com/persistenceOne/persistence-sdk/v2 v2.1.1
github.com/persistenceOne/pstake-native/v2 v2.5.2
github.com/persistenceOne/pstake-native/v2 v2.9.1
github.com/prometheus/client_golang v1.15.0
github.com/rakyll/statik v0.1.7
github.com/skip-mev/pob v1.0.1
github.com/spf13/cast v1.5.1
github.com/spf13/cobra v1.7.0
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
)

require (
cloud.google.com/go v0.110.7 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go v0.110.10 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/core v0.6.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
Expand Down Expand Up @@ -66,7 +66,7 @@ require (
github.com/cosmos/gogoproto v1.4.10 // indirect
github.com/cosmos/iavl v0.20.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/creachadair/taskgroup v0.4.2 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
Expand Down Expand Up @@ -95,13 +95,13 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
Expand Down Expand Up @@ -129,7 +129,7 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.7.16 // indirect
github.com/linxGnu/grocksdb v1.8.6 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down Expand Up @@ -161,26 +161,26 @@ require (
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/api v0.149.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 5d80064

Please sign in to comment.