mvx_sharp_edges
Installation
SKILL.md
MultiversX Sharp Edges
This skill alerts you to non-obvious behaviors, "gotchas," and platform-specific quirks that often lead to bugs.
1. Async Callbacks & Reverts
- The Edge: When an Async Call fails, the
#[callback]is executed. - The Sharp Logic:
- If you don't implement a callback, the funds return to the contract, but state changes in the original transaction are NOT reverted automatically.
- Mitigation: You must manually revert state in the callback if the sub-call failed (or use the synchronous
back_transferscarefully).
2. Gas Limits & Out of Gas (OOG)
- The Edge: OOG raises a specific error but can leave the system in a partial state if not handled.
- The Sharp Logic:
- Cross-shard OOG: If the destination shard runs OOG, the transaction fails, but the sender shard has already processed the transfer. The callback is triggered with an error.