Skip to content

Commit

Permalink
fix: set default wasmd allowed binary size to 1.5mb
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpioborn committed Jul 23, 2024
1 parent f3dc64c commit 59daebc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ var (
v9.Upgrade,
v10.Upgrade,
}
// default wasmd binary maximum allowed size
defaultMaxWasmSize = 1500 * 1024 // 1.5 MB
)

var (
Expand Down Expand Up @@ -172,6 +174,8 @@ func NewSgeApp(
// https://github.com/CosmWasm/wasmd#compile-time-parameters
val, _ := strconv.ParseInt(maxSize, 10, 32)
wasmtypes.MaxWasmSize = int(val)
} else {
wasmtypes.MaxWasmSize = defaultMaxWasmSize
}

// NOTE: we may consider parsing `appOpts` inside module constructors. For the moment
Expand Down

0 comments on commit 59daebc

Please sign in to comment.