Can someone tell me what is the difference between getContractLogs() and getContractEvents()? It seems to me that the logs are the output of the events. Thanks.
getContractLogs
gets all logs (for events) for a contract. Some transactions have multiple logs so thatβs when you would see the same transaction hash for multiple results.
getContractEvents
is for getting event data for a specific event. The event data will be decoded unlike any event (topic) data from getContractLogs.
You can try both and look at the results to compare e.g. with BAYC address.
I tried but itβs the same results as USDC: always returns an empty set
curl --request POST \
--url 'https://deep-index.moralis.io/api/v2/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/events?chain=eth&from_block=15691107&to_block=15691109&topic=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' \
--header 'X-API-Key: 4324324' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "word",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "next",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "another",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}'
Please check your other thread - this is a different question/issue.
Understood, thank you