ITZABUILD PORTAL · v0.8 Start building ↗
GUIDELINE 06

Make every write intentional

Build the signed transaction once, estimate it, show its effects, ask for confirmation, and then submit that exact transaction.

← All guidelines

Before submission

  • Show recipient or contract, amount, currency, fee payer, requested wallets, and irreversible effects.
  • Use integer base units with BigInt; never use floating point for value.
  • Estimate the exact signed transaction that will be submitted.
  • Disable duplicate submission while pending, but preserve enough state to explain or safely retry a failure.

After submission

  • Distinguish “accepted for processing” from final WASM success.
  • Use submit_tx_with_result when the UI needs the asynchronous execution result.
  • Re-query authoritative state rather than assuming the optimistic UI is correct.
Estimate, confirm, submit, verify
const tx = itza.create_tx_transfer(
  wallet.keypair, recipientAddress, BigInt(amountInBaseUnits), 1
);
const estimate = await itza.estimate_tx(tx);

renderConfirmation(estimate);
if (!await userConfirms()) return;

await itza.submit_tx_with_result(tx, async finalEvent => {
  renderFinalResult(finalEvent);
  await refreshWallets();
});
Bottom line

A transaction is a user decision, not merely a button click. Make its target, cost, payer, status, and final result visible.