Skip to content

Commit

Permalink
Merge pull request #71 from oraichain/fix-issue-apphash
Browse files Browse the repository at this point in the history
dang/Fix issue apphash
  • Loading branch information
ledanghuy1811 authored Feb 27, 2025
2 parents 15950ea + 3eb1a10 commit a829488
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG_ORAI.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CHANGELOG

## v0.50.6

<!--
Add a summary for the release here.
If you don't change this message, or if this file is empty, the release
will not be created. -->
Upgrade Oraichain mainnet to v0.50.6 to fix apphash and aorai token issue


## v0.50.5

<!--
Expand Down
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import (
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/mempool"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/types/msgservice"
"github.com/cosmos/cosmos-sdk/version"
Expand Down Expand Up @@ -405,6 +406,11 @@ func NewWasmApp(
// uncomment the below line to enable optimistic execution
baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution())
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...)

// we force to using no-op mempool because
// currently evm tx can only execute with NoOpMempool.
bApp.SetMempool(mempool.NoOpMempool{})

bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
bApp.SetInterfaceRegistry(interfaceRegistry)
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ import (
v0503 "github.com/CosmWasm/wasmd/app/upgrades/v0503"
v0504 "github.com/CosmWasm/wasmd/app/upgrades/v0504"
v0505 "github.com/CosmWasm/wasmd/app/upgrades/v0505"
v0506 "github.com/CosmWasm/wasmd/app/upgrades/v0506"
v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
)

// Upgrades list of chain upgrades
var Upgrades = []upgrades.Upgrade{v050.Upgrade, v0501.Upgrade, v0502.Upgrade, v0503.Upgrade, v0504.Upgrade, v0505.Upgrade}
var Upgrades = []upgrades.Upgrade{v050.Upgrade, v0501.Upgrade, v0502.Upgrade, v0503.Upgrade, v0504.Upgrade, v0505.Upgrade, v0506.Upgrade}

// RegisterUpgradeHandlers registers the chain upgrade handlers
func (app *WasmApp) RegisterUpgradeHandlers() {
Expand Down
36 changes: 36 additions & 0 deletions app/upgrades/v0506/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package v0506

import (
"context"

storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"

"github.com/CosmWasm/wasmd/app/upgrades"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/module"
)

// UpgradeName defines the on-chain upgrade name
const UpgradeName = "v0.50.6"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: storetypes.StoreUpgrades{
Added: []string{},
Deleted: []string{},
},
}

func CreateUpgradeHandler(
mm upgrades.ModuleManager,
configurator module.Configurator,
ak *upgrades.AppKeepers,
keys map[string]*storetypes.KVStoreKey,
cdc codec.BinaryCodec,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, fromVM)
}
}

0 comments on commit a829488

Please sign in to comment.