How to use typescript sdk to scan the log corresponding to the contract on the chain

Hi

Basically the BuyEvent will be part of the transaction response so you might also get it each time the contract is called.

Fuel TS SDK | Fuel Docs

In Typescript you can do this:
Fuel TS SDK | Fuel Docs

To read the entire block chain for a specific contracts logs will be something to do via an indexer take a look here:
How to Index Data on the Fuel Network using Envio (SwayFarm example) - General - Fuel Network & Sway Language

1 Like