Skip to content

Commit

Permalink
feat: increase limit of wasm contracts size to 3mb
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Sep 27, 2023
1 parent 261f47c commit 4f2c9d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ func New(
wasmOpts []wasmkeeper.Option,
baseAppOptions ...func(*baseapp.BaseApp),
) *App {
overrideWasmVariables()

appCodec := encodingConfig.Marshaler
legacyAmino := encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry
Expand Down Expand Up @@ -1249,3 +1251,11 @@ func (app *App) GetConsumerKeeper() ccvconsumerkeeper.Keeper {
func (app *App) RegisterNodeService(clientCtx client.Context) {
nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter())
}

// overrideWasmVariables overrides the wasm variables to:
// - allow for larger wasm files
func overrideWasmVariables() {
// Override Wasm size limitation from WASMD.
wasmtypes.MaxWasmSize = 3 * 1024 * 1024
wasmtypes.MaxProposalWasmSize = wasmtypes.MaxWasmSize
}

0 comments on commit 4f2c9d8

Please sign in to comment.