Skip to content

Commit

Permalink
bep173: enable text proposal on BNB Smart Chain (#892)
Browse files Browse the repository at this point in the history
* bep173: enable text proposal on BNB Smart Chain
  • Loading branch information
randyahx authored Nov 21, 2022
1 parent 8acd271 commit e4d8a5a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ func SetUpgradeConfig(upgradeConfig *config.UpgradeConfig) {
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP128, upgradeConfig.BEP128Height)
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP151, upgradeConfig.BEP151Height)
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP153, upgradeConfig.BEP153Height)
upgrade.Mgr.AddUpgradeHeight(upgrade.BEP173, upgradeConfig.BEP173Height)

// register store keys of upgrade
upgrade.Mgr.RegisterStoreKeys(upgrade.BEP9, common.TimeLockStoreKey.Name())
Expand Down
4 changes: 4 additions & 0 deletions app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ BEP128Height = {{ .UpgradeConfig.BEP128Height }}
BEP151Height = {{ .UpgradeConfig.BEP151Height }}
# Block height of BEP153 upgrade
BEP153Height = {{ .UpgradeConfig.BEP153Height }}
# Block height of BEP173 upgrade
BEP173Height = {{ .UpgradeConfig.BEP173Height }}
[query]
# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"]
Expand Down Expand Up @@ -532,6 +534,7 @@ type UpgradeConfig struct {
BEP128Height int64 `mapstructure:"BEP128Height"`
BEP151Height int64 `mapstructure:"BEP151Height"`
BEP153Height int64 `mapstructure:"BEP153Height"`
BEP173Height int64 `mapstructure:"BEP173Height"`
}

func defaultUpgradeConfig() *UpgradeConfig {
Expand All @@ -554,6 +557,7 @@ func defaultUpgradeConfig() *UpgradeConfig {
BEP128Height: math.MaxInt64,
BEP151Height: math.MaxInt64,
BEP153Height: math.MaxInt64,
BEP173Height: math.MaxInt64,
BEP82Height: math.MaxInt64,
BEP84Height: math.MaxInt64,
BEP87Height: math.MaxInt64,
Expand Down
2 changes: 2 additions & 0 deletions asset/testnet/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ BEP128Height = 23551600
BEP151Height = 28250000
#Block height of BEP153 upgrade
BEP153Height = 30516226
#Block height of BEP173 upgrade
BEP173Height = 9223372036854775807

[query]
# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"]
Expand Down
1 change: 1 addition & 0 deletions common/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const (
BEP128 = sdk.BEP128 // https://github.com/bnb-chain/BEPs/pull/128 Staking reward distribution upgrade
BEP151 = "BEP151" // https://github.com/bnb-chain/BEPs/pull/151 Decommission Decentralized Exchange
BEP153 = sdk.BEP153 // https://github.com/bnb-chain/BEPs/pull/153 Native Staking
BEP173 = sdk.BEP173 // https://github.com/bnb-chain/BEPs/pull/173 Text Proposal
)

func UpgradeBEP10(before func(), after func()) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ require (
)

replace (
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/bnc-cosmos-sdk v0.25.3
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/bnc-cosmos-sdk v0.25.4
github.com/tendermint/go-amino => github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2
github.com/tendermint/iavl => github.com/bnb-chain/bnc-tendermint-iavl v0.12.0-binance.4
github.com/tendermint/tendermint => github.com/bnb-chain/bnc-tendermint v0.32.3-binance.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bnb-chain/bnc-cosmos-sdk v0.25.3 h1:HyMXcSawVtpiU0v6MGvrtVU9x8afsvNuWEOc977MVBc=
github.com/bnb-chain/bnc-cosmos-sdk v0.25.3/go.mod h1:+0MJRhSM5hb/ZvvoWOVt7LaihYM1Ax+PxnAMK/lHHUs=
github.com/bnb-chain/bnc-cosmos-sdk v0.25.4 h1:GDYproO3EbU8gxFNYw/6xYOQKIi9BjsGnuViSxstWXw=
github.com/bnb-chain/bnc-cosmos-sdk v0.25.4/go.mod h1:+0MJRhSM5hb/ZvvoWOVt7LaihYM1Ax+PxnAMK/lHHUs=
github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2 h1:iAlp9gqG0f2LGAauf3ZiijWlT6NI+W2r9y70HH9LI3k=
github.com/bnb-chain/bnc-go-amino v0.14.1-binance.2/go.mod h1:LiCO7jev+3HwLGAiN9gpD0z+jTz95RqgSavbse55XOY=
github.com/bnb-chain/bnc-tendermint v0.32.3-binance.7 h1:wJBrhLAm9P+Jjm/clTxynAZJl63xD7LatKmL5e3YzbY=
Expand Down

0 comments on commit e4d8a5a

Please sign in to comment.