Hi, Our server url:
https://eeuu9emtucrs.usemoralis.com:2053/server
I have add a sync event for our contract : 0x716680F752Ff35AE138b3DAc9F5E4f59DF52a8c2
But I didnt see the table and record of sync table. Please help.
can you share the chain name, function name and ABI of the contract.
Chain name : bsc
event name : PurchaseByBNB(uint256, uint256)
ABI:
{
“anonymous”: false,
“inputs”: [
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “paymentId”,
“type”: “uint256”
},
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “paymentValue”,
“type”: “uint256”
}
],
“name”: “PurchaseByBNB”,
“type”: “event”
}
please help me to check
I tried adding sync from my server and I was able to sync the contract event data.
Can you verify again if the process is followed correctly as per the docs and also make sure correct chain is selected while adding the contract sync.
https://docs.moralis.io/moralis-dapp/automatic-transaction-sync/smart-contract-events#why-do-we-need-to-sync-and-watch-smart-contract-events
Can you check the Logs info & error tab for more details.
If the sync is successfully running you should logs info as below.
I will look a little later to see what happened
I see the table name now. But when I deleted that class, and add sync event again. The error “tableName already in use, please set a new tableName” is still show.
I’m looking now at the server
it looks like the address that was added for that contract is an invalid one
can you double check the contract address?
https://bscscan.com/address/0x716680F752Ff35AE138b3DAc9F5E4f59DF52a8c2
The contract here have tx that was created. So I think it is right address.
Can I remove the table and add it again now?
Try to create another event, the address is not a valid one that is associated with that event
You can rename the table for the event when you make updates
I use the topic 0x76478f3414ab385f49c9c0ebc99d488b8678d33cf72b3f9928700c1ebac792d3 to sync
You can see the event topic on this tx
https://bscscan.com/tx/0x1f7ad159a123cba2d702818a2e201afe2312394b82ec7c8b92c63dbd7c11bed2#eventlog
But no data on my new table (PayBNB). Please check it
I did check the server and the the contract address has one more character than a valid one.
Can you tell me what character?
Just try to replace the address. It has a different size if you paste that one. You can compare what is in event sync with what is in bscscan as address
in particular this seems that it was the difference:
0x716680F752Ff35AE138b3DAc9F5E4f59DF52a8c2
0x716680f752ff35ae138b3bnbdac9f5e4f59df52a8c2