I have created a Node project that connects to Alchemy via ethers. I am trying to capture all Supply events for AaveV3
However, when I use the getLogs
function, and use the contract address as the address
field, it finds no event logs whatsoever.
const AAVE_V3_CONTRACT_ADDRESS = '0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2';
const provider = new ethers.AlchemyProvider('mainnet', ALCHEMY_API_KEY);
async function fetchSupplyEvents(minAmount, maxAmount) {
const logs = await provider.getLogs({
address: AAVE_V3_CONTRACT_ADDRESS,
});
console.log(logs); //returns []
...
You might have noticed, I have totally omited most fields from the getLogs function, because it seems to be unable to capture ANY events that have happened to this contract. There have definitely been events omited, see the link above.
So my question is
Why is Alchemy failing to find any logs when I call eth_getLogs
?