CodeTooLarge

Error v334 → current 29.7

The WASM code exceeds the maximum allowed size.

Encountered by: developers

Why This Error Exists

Large code consumes storage and slows compilation. Optimize your contract or split it.

From Chain Metadata

The code supplied to `instantiate_with_code` exceeds the limit specified in the current schedule.

What This Means

The WASM code exceeds the maximum allowed size.

Common Causes

  • Contract code is too large
  • Unoptimized WASM compilation

How to Fix

  • Query MaxCodeLen for the size limit
  • Enable WASM optimization in compiler settings
  • Split functionality across multiple contracts
  • Remove unused code paths

Runtime Info

Pallet Index
29
Error Index
7
Error Code
29.7
Runtime Version
v393