Skip to content

Commit

Permalink
Merge pull request #320 from neutron-org/feat/increase-limit-of-wasm-…
Browse files Browse the repository at this point in the history
…contracts

feat: increase limit of wasm contracts #ntrn-107
  • Loading branch information
pr0n00gler committed Oct 10, 2023
2 parents 0b93ac4 + 7f42c76 commit 8fff975
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 @@ -1250,3 +1252,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 = 1_677_722 // ~1.6 mb (1024 * 1024 * 1.6)
wasmtypes.MaxProposalWasmSize = wasmtypes.MaxWasmSize
}

0 comments on commit 8fff975

Please sign in to comment.