Skip to content

Instantly share code, notes, and snippets.

@Shaneumayanga
Shaneumayanga / gist:901085912bba6421e7875abeb3d42a69
Created February 6, 2025 12:51
transaction sender and waiter for solana
async function transactionSenderAndConfirmationWaiter({
serializedTransaction,
blockhashWithExpiryBlockHeight,
maxRetryTimeMs = 60000,
}) {
const startTime = Date.now();
const txid = await connection.sendRawTransaction(
serializedTransaction,
{