Canton dApp Booster
    Preparing search index...
    • Submits ledger commands and tracks the transaction in lastTx, fed by the SDK's txChanged event. Wagmi: useWriteContract + useWaitForTransactionReceipt, since execute resolves after execution rather than at submission.

      Returns UseExecuteResult

      with no CantonConnectProvider above it, and from execute where nothing is connected or the command fails, the failure also landing in error.

      const { execute, lastTx } = useExecute()
      await execute({ commandId: 'claim-1', commands })
      lastTx?.status // 'pending' | 'signed' | 'executed' | 'failed'