Skip to content

docs: add Common Pitfalls section to MASM index#341

Open
pplmaverick wants to merge 1 commit into
0xMiden:mainfrom
pplmaverick:docs/masm-common-pitfalls
Open

docs: add Common Pitfalls section to MASM index#341
pplmaverick wants to merge 1 commit into
0xMiden:mainfrom
pplmaverick:docs/masm-common-pitfalls

Conversation

@pplmaverick

Copy link
Copy Markdown

Adds a Common Pitfalls section to the MASM smart contracts index page covering
two undocumented traps encountered during dApp development:

  1. Procedure hash byte order: MASP inspector output is big-endian per 8-byte chunk,
    but call.0xHEX requires little-endian per chunk. Includes a Python conversion snippet.
    Related: docs: MASP inspector proc hash requires per-chunk byte-reversal before use in call.0xHEX compiler#1267

  2. call vs exec stack depth: calling a Felt-returning procedure via call.0xPROC_HASH
    triggers InvalidStackDepthOnReturn { depth: 17 }. Workaround is exec + void redesign.
    Related: New compiler(next)breaks miden-client exec and call - "stack depth must be 16, was 17" compiler#1192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant