Skip to content

Commit

Permalink
chore: override MAX_WASM_SIZE at compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
jim380 committed Jan 31, 2024
1 parent 36ee178 commit bc0ec3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"math/big"
"os"
"path/filepath"
"strconv"

"github.com/spf13/cast"

Expand Down Expand Up @@ -589,6 +590,12 @@ func NewApp(
panic(err)
}

if maxSize := os.Getenv("MAX_WASM_SIZE"); maxSize != "" {
// https://github.com/CosmWasm/wasmd#compile-time-parameters
val, _ := strconv.ParseInt(maxSize, 10, 32)
wasmtypes.MaxWasmSize = int(val) // default 819200 (800 * 1024)
}

/* =================================================== */
/* TRANSFER STACK */
/* =================================================== */
Expand Down

0 comments on commit bc0ec3f

Please sign in to comment.