Skip to content

Commit

Permalink
feat(wasm)!: increase contract size limit to 3MB (#1906)
Browse files Browse the repository at this point in the history
* feat(wasm): increase contract size limit to 3MB

* chore: update changelog
  • Loading branch information
k-yang authored Jun 4, 2024
1 parent e7e708d commit 3a60458
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1766](https://github.com/NibiruChain/nibiru/pull/1766) - refactor(app-wasmext)!: remove wasmbinding `CosmosMsg::Custom` bindings.
- [#1776](https://github.com/NibiruChain/nibiru/pull/1776) - feat(inflation): make inflation params a collection and add commands to update them
- [#1872](https://github.com/NibiruChain/nibiru/pull/1872) - chore(math): use cosmossdk.io/math to replace sdk types

- [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer as per Cosmos SDK migration guidelines
- [#1906](https://github.com/NibiruChain/nibiru/pull/1906) - feat(wasm): increase contract size limit to 3MB

#### Nibiru EVM

Expand Down
9 changes: 9 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ func GetWasmOpts(nibiru NibiruApp, appOpts servertypes.AppOptions) []wasmkeeper.

const DefaultMaxTxGasWanted uint64 = 0

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

// NewNibiruApp returns a reference to an initialized NibiruApp.
func NewNibiruApp(
logger log.Logger,
Expand All @@ -137,6 +145,7 @@ func NewNibiruApp(
appOpts servertypes.AppOptions,
baseAppOptions ...func(*baseapp.BaseApp),
) *NibiruApp {
overrideWasmVariables()
appCodec := encodingConfig.Codec
legacyAmino := encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry
Expand Down

0 comments on commit 3a60458

Please sign in to comment.