Blockchain Hooks
Last updated
function TransactionStatus({ txId }) {
const { data: receipt, isLoading } = useTxReceipt(txId);
if (isLoading) return <div>Loading...</div>;
return <div>Transaction Status: {receipt?.reverted ? 'Failed' : 'Success'}</div>;
}const events = await getEvents({
abi,
contractAddress,
eventName,
filterParams,
mapResponse,
nodeUrl,
});