From 17bf98c105b68e01c3c0e81886f3d85e825a5f1e Mon Sep 17 00:00:00 2001 From: "dang.vh" Date: Thu, 2 Jan 2025 13:42:25 +0700 Subject: [PATCH] override default wasm variable to extend wasm code size --- app/app.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/app.go b/app/app.go index 19c89fb2b..b014dc09a 100644 --- a/app/app.go +++ b/app/app.go @@ -317,6 +317,11 @@ type WasmApp struct { configurator module.Configurator } +func overrideWasmVariables() { + // Override Wasm size limitation from WASMD. + wasmtypes.MaxWasmSize = 3 * 1024 * 1024 +} + // NewWasmApp returns a reference to an initialized WasmApp. func NewWasmApp( logger log.Logger, @@ -404,6 +409,7 @@ func NewWasmApp( bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) bApp.SetTxEncoder(txConfig.TxEncoder()) + overrideWasmVariables() keys := storetypes.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey,