Sui.

Post

Share your knowledge.

article banner.
Neeola.
Aug 23, 2025
Article

Debugging Transactions on Sui: From Failed Digest to Root Cause

Goal: Learn how to go from a mysterious failed transaction to a clear diagnosis and fix.

Step 1 Capture the failure clearly

Problem: Transaction “failed” but you don’t know why. 1. Every Sui command returns a transaction digest. Save it.

Step 2 — Decode common error classes

  1. Gas errors • “Insufficient gas” → top up via faucet or adjust --gas-budget. • “Gas object not found” → re-fund your account or check you didn’t delete the coin accidentally.

  2. Ownership errors • “Cannot find owned object” → object is either moved, deleted, or owned by another account. • Solution: fetch latest object state.

  3. Version mismatch • “Object version too old” → someone else updated the object. • Fix: re-fetch, rebuild the tx with the latest version.

Step 3 — Log with events

Problem: Hard to know where execution failed inside your Move function.

Solution: Add debug-style events.

Step 4 — Reproduce locally

Problem: Testnet failures can be slow to iterate.

Solution: 1. Spin up a localnet: 2. Re-run the same transaction locally. Failures reproduce faster. 3. Unit-test in Move to isolate logic before pushing again.

  • Sui
0
Share
Comments
.