I need to get all events of my smart contract to be able to show change history of an object.
Ti do that, I use the following code that I found on documentation.
const provider = new ethers.providers.Web3Provider(ethereum);
provider
.getLogs({
fromBlock: "earliest",
toBlock: "latest",
address: process.env.NEXT_PUBLIC_CONTRACT_ADDR,
topic: actifContract.interface.events.ActifUpdated,
})
.then((res) => console.log(res));
I use "ethersjs" lib to interact with the BC. My problem is that I can't get any event even if I'm sure some event, of type "ActifUpdated" were raise. How can I get the expected result ?
I use BC for this project to be able to trace any change of my objects.