multiversx-wasm-debug

Analyzes .wasm files for size optimization and defects using Twiggy and other tools.

12|5|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/multiversx/mx-ai-skills --skill multiversx-wasm-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multiversx-wasm-debug
Source: https://github.com/multiversx/mx-ai-skills/tree/main/skills/multiversx-wasm-debug
Command: npx skills add https://github.com/multiversx/mx-ai-skills --skill multiversx-wasm-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires twiggy, wasm-objdump, wasm-opt, wasmtime, sc-meta, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers troubleshoot and optimize their MultiversX smart contract WASM binaries, addressing issues like deployment failures due to size limits, runtime panics, and inefficient code.

Core Features & Use Cases

  • WASM Size Analysis: Identifies components contributing to large binary sizes using tools like twiggy.
  • Panic Investigation: Helps diagnose the root cause of contract traps and unreachable errors.
  • DWARF Debugging: Enables source-level debugging by analyzing DWARF symbols.
  • Optimization: Provides techniques for reducing WASM binary size through Cargo profiles and wasm-opt.
  • Use Case: A developer is encountering a "contract deployment failed" error due to exceeding the WASM size limit. They can use this Skill to analyze the binary with twiggy, identify large dependencies or unused code, and apply optimization techniques to reduce its size.

Quick Start

Analyze the WASM binary located at 'output/my-contract.wasm' for size optimization using twiggy.

Frequently Asked Questions about multiversx-wasm-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce MultiversX WASM smart contract size for deployment?

To reduce MultiversX WASM smart contract size, analyze the compiled binary using twiggy to identify large dependencies and unused code. You can then apply optimization techniques through Cargo profiles and wasm-opt to successfully reduce the binary footprint.

How do I debug runtime panics and unreachable errors in MultiversX smart contracts?

Debug MultiversX smart contract runtime panics by investigating the root cause of contract traps and unreachable errors. This Skill helps diagnose these issues by analyzing compiled WASM binaries and utilizing DWARF symbols for source-level debugging.

What tools are required for MultiversX WASM debugging and optimization?

MultiversX WASM debugging and optimization requires twiggy for size analysis, wasm-objdump for binary inspection, wasm-opt for optimization, wasmtime for runtime execution, and sc-meta for comprehensive smart contract analysis and troubleshooting.

Can I use DWARF symbols for source-level debugging of MultiversX WASM binaries?

Yes, you can use DWARF symbols to enable source-level debugging of MultiversX WASM binaries. This allows developers to map runtime errors and panics back to the original Rust source code for effective troubleshooting.

Why did my MultiversX smart contract deployment fail due to WASM size limits?

MultiversX smart contract deployment fails due to WASM size limits when the compiled binary exceeds the platform maximum. You can resolve this by analyzing the binary with twiggy to identify bloated components and applying wasm-opt optimization techniques.