I am trying to listen to an approval event in an ERC721 token. On approval, I want to call a function.
const approving = new ethers.Contract(gift.address, abi, signer)
await approving.approve(contractAddress, gift.tokenID)
approving.on('Approval', async() => {
//await some function
})
This was the syntax that I used and I am fairly certain that it worked for a while. Now, however, I get the error: "no matching event (argument="name", value="Approval", code=INVALID_ARGUMENT, version=abi/5.6.4)".