How to query pancakeswap staking contract by holder

I’ve been trying to find information on how to query pancakeswap’s staking contract for some time now, and I’ve unfortunately been unsuccessful this far. I was wondering if anyone would be so kind as to provide some pointers in a way that I could achieve this?

What I’m looking for is a way to obtain information about staked Cake from a specific contract and/or wallet address, including any pending/unclaimed rewards. I apologise if this is an obvious question, but as a junior dev who’s experience is almost entirely outside of blockchain and crypto, I’m at a loss as to where I should look.

This is for a personal project, with the ambition of familiarising myself with blockchain, and contract exploration.

Thanks in advance for any replies and pointers!

Hi, this doesn’t seem to be an easy question. Unless someone indexed that information there isn’t a simple way to query it.

You can start by processing all the events from that contract in order to build that information (this would be quite complicated if that contract has a lot of transactions)