Closed k-yang closed 1 month ago
The recent update increases the contract size limit to 3MB in the Nibiru EVM. This change involves adding a new function overrideWasmVariables
in app.go
to adjust the wasm size limitations, allowing for larger wasm files. This enhancement ensures that the contract size limit exceeds 2.5MB, addressing the requirements specified in issue #1905.
File(s) | Change Summary |
---|---|
CHANGELOG.md | Added a summary of the change, highlighting the increase in contract size limit. |
app/app.go | Introduced overrideWasmVariables function to adjust wasm size limitations. |
sequenceDiagram
participant User
participant Nibiru EVM
participant App
User->>Nibiru EVM: Deploy contract (>2.5MB)
Nibiru EVM->>App: Check wasm size
App->>App: overrideWasmVariables()
App->>Nibiru EVM: Allow deployment (size limit 3MB)
Nibiru EVM->>User: Contract deployed successfully
Objective | Addressed | Explanation |
---|---|---|
Increase contract size limit to >2.5MB (#1905) | ✅ |
In the land of code, a change did rise,
To let the contracts grow in size.
From two-point-five to three megabytes,
Now wasm files reach new heights.
WithoverrideWasmVariables
in play,
Bigger contracts deploy without delay.
🎉🐇💻
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 62.14%. Comparing base (
e7e708d
) to head (9fa8b71
).
Purpose / Abstract
Increases the contract size limit to 3MB (up from 800KB). I originally tried to set the config via compile time flag (
-X github.com/CosmWasm/wasmd/x/wasm/types.MaxWasmSize=3145728
) but got an errorgithub.com/CosmWasm/wasmd/x/wasm/types.MaxWasmSize: cannot set with -X: not a var of type string (type:int)
. Seems like it's not possible to set an int variable with a compile time flag.I took inspiration from Osmosis'
overrideWasmVariables()
.Summary by CodeRabbit