Sui.

Post

Share your knowledge.

Opiiii.
Opiiii1029
Aug 26, 2025
Expert Q&A

How do developers test transactions before spending gas??

Sui offers a dev-inspect feature that lets developers run transactions in a simulated environment. This way, they can inspect object changes and execution results without committing them on-chain or paying gas.

  • Architecture
  • SDKs and Developer Tools
  • Transaction Processing
0
6
Share
Comments
.

Answers

6
Copeee.
Aug 26 2025, 14:31

transaction would execute without committing it on-chain. With dev-inspect, they can see object changes, return values, and potential errors in advance, which makes debugging and contract development much safer and cheaper. By leveraging this feature, developers can refine their logic, confirm expected outcomes, and only submit finalized transactions to the network when they’re confident, thereby saving gas and avoiding failed execution

1
Comments
.
Morgan.
Sep 4 2025, 14:37

That’s right. On Sui you can use dev-inspect (via the CLI or SDKs) to “dry-run” a transaction. It executes the transaction against the current chain state, but:

  • No state is committed – the objects aren’t actually mutated.
  • No gas is charged – you see what it would cost without paying.
  • You get full output – return values, events, and the before/after of objects.

Developers use it to debug logic, check invariants, or estimate gas usage before sending the real transaction. It’s basically a safe rehearsal on live chain data.

0
Comments
.

Do you know the answer?

Please log in and share it.