Polkadot Apps
    Preparing search index...

    Function submitAndWatch

    • Submit a transaction and watch its lifecycle through signing, broadcasting, block inclusion, and (optionally) finalization.

      Parameters

      • tx: SubmittableTransaction

        A transaction object with signSubmitAndWatch. Works with raw PAPI transactions and Ink SDK AsyncTransaction wrappers (resolved automatically).

      • signer: PolkadotSigner

        The signer to use. Can come from a wallet extension, Host API (getProductAccountSigner), or createDevSigner.

      • Optionaloptions: SubmitOptions

        Submission options (waitFor, timeout, mortality, status callback).

      Returns Promise<TxResult>

      The transaction result once included/finalized.

      If the transaction does not reach the target state within timeoutMs.

      If the on-chain dispatch fails (e.g., insufficient balance, contract revert).

      If the user rejects signing in their wallet.