salt-sdk - v0.0.45
    Preparing search index...

    Class TransactionRevertedErrorSealed

    Thrown by a transaction ceremony when the transaction was mined but reverted. Gas was spent and the nonce is used; nothing else changed.

    The record is marked failure with code reverted, and the receipt is stored on it as broadcastReceipt.

    Subclasses SaltCeremonyError.

    import { TransactionRevertedError } from 'salt-sdk';

    try {
    await (await salt.submitTx(params)).wait();
    } catch (err) {
    if (err instanceof TransactionRevertedError) {
    console.error(`Reverted in block ${err.receipt.blockNumber}: ${err.txHash}`);
    } else {
    throw err;
    }
    }

    Hierarchy (View Summary)

    Index
    cause?: Error
    data?: unknown

    Optional structured data attached to the failure (e.g. on-chain receipt).

    failureCode: "reverted" = ...

    The code recorded as the transaction's TransactionFailureReason when this error fails a transaction. Set by the subclasses that have one; any other failure is recorded as unknown.

    message: string
    name: string

    The on-chain receipt, with status: 'reverted'.

    stack?: string
    txHash: `0x${string}`

    Hash of the reverted transaction.