Skip to content

Commit a829488

Browse files
Merge pull request #71 from oraichain/fix-issue-apphash
dang/Fix issue apphash
2 parents 15950ea + 3eb1a10 commit a829488

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

CHANGELOG_ORAI.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGELOG
22

3+
## v0.50.6
4+
5+
<!--
6+
Add a summary for the release here.
7+
8+
If you don't change this message, or if this file is empty, the release
9+
will not be created. -->
10+
Upgrade Oraichain mainnet to v0.50.6 to fix apphash and aorai token issue
11+
12+
313
## v0.50.5
414

515
<!--

app/app.go

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import (
5353
"github.com/cosmos/cosmos-sdk/server/config"
5454
servertypes "github.com/cosmos/cosmos-sdk/server/types"
5555
sdk "github.com/cosmos/cosmos-sdk/types"
56+
"github.com/cosmos/cosmos-sdk/types/mempool"
5657
"github.com/cosmos/cosmos-sdk/types/module"
5758
"github.com/cosmos/cosmos-sdk/types/msgservice"
5859
"github.com/cosmos/cosmos-sdk/version"
@@ -405,6 +406,11 @@ func NewWasmApp(
405406
// uncomment the below line to enable optimistic execution
406407
baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution())
407408
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...)
409+
410+
// we force to using no-op mempool because
411+
// currently evm tx can only execute with NoOpMempool.
412+
bApp.SetMempool(mempool.NoOpMempool{})
413+
408414
bApp.SetCommitMultiStoreTracer(traceStore)
409415
bApp.SetVersion(version.Version)
410416
bApp.SetInterfaceRegistry(interfaceRegistry)

app/upgrades.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ import (
3333
v0503 "github.com/CosmWasm/wasmd/app/upgrades/v0503"
3434
v0504 "github.com/CosmWasm/wasmd/app/upgrades/v0504"
3535
v0505 "github.com/CosmWasm/wasmd/app/upgrades/v0505"
36+
v0506 "github.com/CosmWasm/wasmd/app/upgrades/v0506"
3637
v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2"
3738
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
3839
)
3940

4041
// Upgrades list of chain upgrades
41-
var Upgrades = []upgrades.Upgrade{v050.Upgrade, v0501.Upgrade, v0502.Upgrade, v0503.Upgrade, v0504.Upgrade, v0505.Upgrade}
42+
var Upgrades = []upgrades.Upgrade{v050.Upgrade, v0501.Upgrade, v0502.Upgrade, v0503.Upgrade, v0504.Upgrade, v0505.Upgrade, v0506.Upgrade}
4243

4344
// RegisterUpgradeHandlers registers the chain upgrade handlers
4445
func (app *WasmApp) RegisterUpgradeHandlers() {

app/upgrades/v0506/upgrades.go

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package v0506
2+
3+
import (
4+
"context"
5+
6+
storetypes "cosmossdk.io/store/types"
7+
upgradetypes "cosmossdk.io/x/upgrade/types"
8+
9+
"github.com/CosmWasm/wasmd/app/upgrades"
10+
"github.com/cosmos/cosmos-sdk/codec"
11+
"github.com/cosmos/cosmos-sdk/types/module"
12+
)
13+
14+
// UpgradeName defines the on-chain upgrade name
15+
const UpgradeName = "v0.50.6"
16+
17+
var Upgrade = upgrades.Upgrade{
18+
UpgradeName: UpgradeName,
19+
CreateUpgradeHandler: CreateUpgradeHandler,
20+
StoreUpgrades: storetypes.StoreUpgrades{
21+
Added: []string{},
22+
Deleted: []string{},
23+
},
24+
}
25+
26+
func CreateUpgradeHandler(
27+
mm upgrades.ModuleManager,
28+
configurator module.Configurator,
29+
ak *upgrades.AppKeepers,
30+
keys map[string]*storetypes.KVStoreKey,
31+
cdc codec.BinaryCodec,
32+
) upgradetypes.UpgradeHandler {
33+
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
34+
return mm.RunMigrations(ctx, configurator, fromVM)
35+
}
36+
}

0 commit comments

Comments
 (0)