Upgrading Cosmos EVM from v0.3.x to v0.4.0, step by step
cosmos/evm
to v0.4.0 and align Cosmos SDK/IBC/CometBFT constraintsRegisterServices
)SetClientCtx
methodgit switch -c upgrade/evm-v0.4
cosmos/evm
dependency in go.mod
:
google.golang.org/protobuf
, github.com/gofrs/flock
, github.com/consensys/gnark-crypto
):
newApp
to return an evmserver.Application
rather than servertypes.Application
, and CLI commands that still expect an SDK app creator require a wrapper.
pruning.Cmd
and snapshot.Cmd
:
bankKeeper
first:
AddressCodec
:
DynamicPrecompiles
or NativePrecompiles
in storagereplace
lines)app.toml
diff only if you changed defaults; otherwise regenerate the file from the new binary and re-apply customizationspruning
/snapshot
panic or wrong type:
sdkAppCreatorWrapper
(not ac.newApp
) into those commandsbankKeeper
first; update the call siteAddressCodec
via defaults or WithAddressCodec(...)
RegisterPendingTxListener
during app construction or module initgo.mod
has no replace
lines for github.com/cosmos/evm