> For the complete documentation index, see [llms.txt](https://docs.frequencychain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frequencychain.org/15.-apis-and-sdk-integration/15.7-monitoring-and-event-handling.md). Agents can also search and read this documentation through its [MCP server](https://docs.frequencychain.org/~gitbook/mcp).

# 15.7 Monitoring and Event Handling

Smart contracts emit events that can be used to track activity.

```
Using ethers.js:
contract.on("PaymentReceived", (sender, amount) => {
  console.log(`Payment from ${sender}: ${amount}`);
});
```

This allows applications to respond to blockchain events in real time.
