[SOLVED] Smart Contract Sync not working

I am listening to NFT Mint events. I have configured the contract address and other details in sync configuration. But still, I don’t get the transaction details on the DB.

you have to provide more info, how can I help you only with this info?


I have added the _EventSyncStatus.
I Selected NFT ERC-721 contract sync -> 0x9bbfbbd3fffbd0ea6612d0dc7d2479478041428c (contract Address) -> selected polygon Mumbai network -> selected Mint(address,uint256) as topic -> table name -> description -> toggled sync historical
and added the sync.

but when I mint an NFT from the given address I don’t see the transaction details on the DB

what is the server url?

https://h87avvxhwu2q.usemoralis.com:2053/server

can you point me to a transaction on chain that emits that mint event for that specific contract address?


Since this doesn’t emit a Mint event i also Tested out with transfer event too. But still facing the issue

How did you test with transfer event?
What was the topic, abi, address?

topic: Transfer(address,address,uint256)

ABI: {“anonymous”:false,“inputs”:[{“indexed”:true,“name”:“from”,“type”:“address”},{“indexed”:true,“name”:“to”,“type”:“address”},{“indexed”:false,“name”:“tokenId”,“type”:“uint256”}],“name”:“Transfer”,“type”:“event”}

contract_address: 0x9bbfbbd3fffbd0ea6612d0dc7d2479478041428c

I synced another contract event and configured for Transfer events too, to check whether atleast Transfer events would work

it looks like you tried to sync an event, but with the wrong abi, you need the exact abi that was used in that contract

you mean the event ABI or the whole contract ABI?

the event abi, is not the expected one in that case, indexed fields matter too

ABI:

 {
   "anonymous":false,
   "inputs":[
      {
         "indexed":true,
         "internalType":"address",
         "name":"from",
         "type":"address"
      },
      {
         "indexed":true,
         "internalType":"address",
         "name":"to",
         "type":"address"
      },
      {
         "indexed":true,
         "internalType":"uint256",
         "name":"tokenId",
         "type":"uint256"
      }
   ],
   "name":"Transfer",
   "type":"event"
}

this is the ABI

here you pasted a different abi:

Yes I updated it and Tested, but no luck

it looks like this is not the right abi either for that event

But this is the ABI i took from the NFT contract

from what NFT contract?

Proxy Contract - https://mumbai.polygonscan.com/address/0x9bbfbbd3fffbd0ea6612d0dc7d2479478041428c

NFT Implementation - (Got ABI from here)

you can see the events with this:

curl -X 'POST' \
  'https://deep-index.moralis.io/api/v2/0x9bbfbbd3fffbd0ea6612d0dc7d2479478041428c/events?chain=mumbai&topic=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' \
  -H 'accept: application/json' \
  -H 'X-API-Key: test' \
  -H 'Content-Type: application/json' \
  -d '{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"}'

=>

{
  "total": 9,
  "page": 0,
  "page_size": 100,
  "result": [
    {
      "transaction_hash": "0x0a91e0e99670c45ac239af9a2380205b5aaafe0e052e7ee9b6689598828a7540",
      "address": "0x9bbfbbd3fffbd0ea6612d0dc7d2479478041428c",
      "block_timestamp": "2022-09-08T12:46:59.000Z",
      "block_number": "27995475",
      "block_hash": "0x8bbdf19d3a080a3fae5794973c0aef6c7d43d4eaac93511e08a3e52fa09cb8f0",
      "data": {
        "from": "0xb7cd3878c7dfef409894e66a33aa75c06881e4a5",
        "to": "0x951cea7ffdc2e05c209f47c2d32c70f7ac70dda1",
        "tokenId": "1"
      }
    },

it doesn’t look like the tokenId is indexed