Skip to content

landedTransactions

landedTransactions(transactions): Required<Pick<JSONRPCOptions, "eth_getTransactionByHash" | "eth_getTransactionReceipt">>

Defined in: packages/synapse-core/src/mocks/jsonrpc/transactions.ts:130

JSON-RPC handlers for transactions an SP submitted. Spread them into JSONRPC options. Unknown hashes have no transaction or receipt, so a receipt wait keeps polling.

Parameter Type Description
transactions Record<`0x${string}`, LandedTransaction> | ((hash) => LandedTransaction | undefined) How each transaction landed, keyed by hash, or a lookup that returns undefined for unknown hashes.

Required<Pick<JSONRPCOptions, "eth_getTransactionByHash" | "eth_getTransactionReceipt">>

eth_getTransactionByHash and eth_getTransactionReceipt handlers.

server.use(
  Mocks.JSONRPC({
    ...Mocks.presets.basic,
    ...Mocks.landedTransactions({ [txHash]: { dataSetId: 1n, pieceIds: [0n] } }),
  })
)