Post
Share your knowledge.
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
Answers
6transaction 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
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.
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410