This section of the docs deal with tracking and monitoring the pace and speed of transactions done within the Polygon ecosystem. Depositing into the network (when done with the PoS bridge) typically takes an average of 5-7 minutes but we've seen instances where users seek to see real time progress reports. As a developer, you may also want to augment the UX of your app with instant feedback to the user. In all these cases, look into this section, we have exactly what you need.
When a user deposits a token from Ethereum to Polygon, the State Sync Mechanism is triggered. If you didn't click on that link, the state sync mechanism is simply the native mechanism that reads Ethereum data from Polygon EVM chain and establishes a balance between the two chains. Over a process that lasts for 5-7 minutes, the mechanism mints the equivalent value of the Ethereum tokens deposits on the Polygon chain for the user. As this takes a small amount of time, it is sometimes good UX to listen to the event stream and track it to see when it starts and ends.
Realtime deposit event tracking using a web socket connection
The fastest route to seeing the stream of the connection and intermittently checking to see its process is via a WebSocket protocol. This is what your sample script should look like
Historical Checkpoint Inclusion Check by querying the blockchain
This can be checked using the following API. The block number of the burn transaction on the child chain has to be given as a param to this GET API.