SV3 logo

wait

Wait for a protocol transaction receipt and decode SV3 events.

Confirms a hash and returns a typed receipt. Used by pending.wait() after executePrepared, or directly as sv3.transactions.wait(hash) when you already have a hash.

Mined reverts become TransactionRevertedError with a decoded ProtocolRevertError cause when the revert data is a protocol custom error.

Import

import { createSv3Client } from "@repo/contract-client";

Usage

const pending = await sv3.transactions.executePrepared(prepared);
const confirmed = await pending.wait();

confirmed.hash;
confirmed.receipt.status;
confirmed.events;

From a hash:

const confirmed = await sv3.transactions.wait(hash, { confirmations: 1 });

Return Value

Promise<{ hash, receipt, events }>

FieldMeaning
hashTransaction hash
receiptviem TransactionReceipt
eventsDecoded protocol logs (Bought, Sold, FloorRedeemed, …)

Parameters

hash

  • Type: Hex
await sv3.transactions.wait("0x…");

options.confirmations (optional)

  • Type: number
  • Default: client defaultConfirmations (1)
await sv3.transactions.wait(hash, { confirmations: 2 });

options.timeoutMs (optional)

  • Type: number
await sv3.transactions.wait(hash, { timeoutMs: 60_000 });

On pending.wait(), the same options are accepted.

Error

ErrorWhen
TransactionRevertedErrorReceipt status reverted; cause is decoded when possible

Tips

  • Prefer pending.wait() so you keep the simulation that was sent.
  • Event names follow the interface ABI, not implementation-only logs.