Skip to content

Commit

Permalink
fix: update cosmos-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Nov 29, 2023
1 parent feee0f2 commit 610de96
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/cosmos/cosmos-sdk v0.25.0
github.com/deathowl/go-metrics-prometheus v0.0.0-20200518174047-74482eab5bfb
github.com/eapache/go-resiliency v1.1.0
github.com/ethereum/go-ethereum v1.11.3
github.com/go-kit/kit v0.10.0
github.com/google/btree v1.0.0
github.com/gorilla/mux v1.8.0
Expand Down Expand Up @@ -48,7 +49,6 @@ require (
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/etcd-io/bbolt v1.3.3 // indirect
github.com/ethereum/go-ethereum v1.11.3 // indirect
github.com/ferranbt/fastssz v0.0.0-20210526181520-7df50c8568f8 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
Expand Down Expand Up @@ -165,7 +165,8 @@ require (

replace (
github.com/Shopify/sarama v1.26.1 => github.com/Shopify/sarama v1.21.0
github.com/cosmos/cosmos-sdk => github.com/j75689/bnc-cosmos-sdk v0.0.0-20231116015058-f4c4b6cf4304 //github.com/bnb-chain/bnc-cosmos-sdk v0.26.6
// TODO: bump to official release
github.com/cosmos/cosmos-sdk => github.com/j75689/bnc-cosmos-sdk v0.0.0-20231129030639-0bac8422dcb4
github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/prysmaticlabs/grpc-gateway/v2 v2.3.1-0.20210702154020-550e1cd83ec1
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/tendermint/go-amino => github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,8 @@ github.com/iris-contrib/jade v1.1.4/go.mod h1:EDqR+ur9piDl6DUgs6qRrlfzmlx/D5Uybo
github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g=
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA=
github.com/j75689/bnc-cosmos-sdk v0.0.0-20231116015058-f4c4b6cf4304 h1:pRwSJU1SnmKNmpK8yIdTEoeny2MbKoQPvmvoY/BUaA8=
github.com/j75689/bnc-cosmos-sdk v0.0.0-20231116015058-f4c4b6cf4304/go.mod h1:OjdXpDHofs6gcPLM9oGD+mm8DPc6Lsevz0Kia53zt3Q=
github.com/j75689/bnc-cosmos-sdk v0.0.0-20231129030639-0bac8422dcb4 h1:uGe9w4AzTkpmuTORXrKf35I0zpn2OfFByvxb5uOq1jk=
github.com/j75689/bnc-cosmos-sdk v0.0.0-20231129030639-0bac8422dcb4/go.mod h1:OjdXpDHofs6gcPLM9oGD+mm8DPc6Lsevz0Kia53zt3Q=
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/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
Expand Down
2 changes: 1 addition & 1 deletion plugins/tokens/freeze/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func NewHandler(tokenMapper store.Mapper, accKeeper auth.AccountKeeper, keeper b
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
switch msg := msg.(type) {
case FreezeMsg:
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
if sdk.IsUpgrade(sdk.FirstSunsetFork) {
return sdk.ErrMsgNotSupported("").Result()
}
return handleFreezeToken(ctx, tokenMapper, accKeeper, keeper, msg)
Expand Down
2 changes: 1 addition & 1 deletion plugins/tokens/issue/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
// NewHandler creates a new token issue message handler
func NewHandler(tokenMapper store.Mapper, keeper bank.Keeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
if sdk.IsUpgrade(sdk.FirstSunsetFork) {
return sdk.ErrMsgNotSupported("").Result()
}
switch msg := msg.(type) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/tokens/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const (
)

func EndBlocker(ctx sdk.Context, timelockKeeper timelock.Keeper, swapKeeper swap.Keeper) {
if !sdk.IsUpgrade(sdk.BCFusionSecondHardFork) {
if !sdk.IsUpgrade(sdk.SecondSunsetFork) {
return
}
logger := bnclog.With("module", "tokens")
Expand Down
4 changes: 2 additions & 2 deletions plugins/tokens/swap/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ func NewHandler(kp Keeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
switch msg := msg.(type) {
case HTLTMsg:
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
if sdk.IsUpgrade(sdk.FirstSunsetFork) {
return sdk.ErrMsgNotSupported("").Result()
}
return handleHashTimerLockedTransfer(ctx, kp, msg)
case DepositHTLTMsg:
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
if sdk.IsUpgrade(sdk.FirstSunsetFork) {
return sdk.ErrMsgNotSupported("").Result()
}
return handleDepositHashTimerLockedTransfer(ctx, kp, msg)
Expand Down
4 changes: 2 additions & 2 deletions plugins/tokens/timelock/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ func NewHandler(keeper Keeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
switch msg := msg.(type) {
case TimeLockMsg:
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
if sdk.IsUpgrade(sdk.FirstSunsetFork) {
return sdk.ErrMsgNotSupported("").Result()
}
return handleTimeLock(ctx, keeper, msg)
case TimeUnlockMsg:
return handleTimeUnlock(ctx, keeper, msg)
case TimeRelockMsg:
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
if sdk.IsUpgrade(sdk.FirstSunsetFork) {
return sdk.ErrMsgNotSupported("").Result()
}
return handleTimeRelock(ctx, keeper, msg)
Expand Down

0 comments on commit 610de96

Please sign in to comment.