[SOLVED] Can't sync historical events

Hi,
I’m trying to Sync and Watch Contract Events.
I’ve made a simple toy example, a ERC721 with a custom event when a new token is minted

_chainId: rinkeby
_topic: itemCreated(uint256,string)
_abi:

{
  "anonymous": false,
  "inputs": [
    {
      "indexed": false,
      "internalType": "uint256",
      "name": "id",
      "type": "uint256"
    },
    {
      "indexed": false,
      "internalType": "string",
      "name": "tokenURI",
      "type": "string"
    }
  ],
  "name": "itemCreated",
  "type": "event"
}

_address: 0xfF03E5E0ccb1792EF14F58511dD00183EB6fb257

If I activate the sync, the new events are fetched, but I don’t get the historical ones.
Regards

Try to rename in the abi that field with id name to something else

I tried but still it doesn’t sync historical events

what is the server url, did you also try to restart the server?

Yes, I tried to restart.
Here the server url: https://kvct9oupq7wg.usemoralis.com:2053/server

you can check again now, I did a restart to coreservices

Yes now it works, thank you very much.

I had to delete and sync a new contract event and the former problem reappered.
Is there something I can do?
Thanks

can you check again now?

Yes, it works. Many thanks

Hello, Hope you are doing well, I am a web3 developer, Moralisian…
I met one bug, I have read all forum messages but can not find answer.
I created server and setup sync historical event, but can not sync historical event, only sync new event.

Did you tick or set sync_historical to true? Try deleting and creating it again.

thanks for your reply :slight_smile:
I will try now

still same, not works fine.


this is my server setup for sync historical event

Can you give the address, ABI, topic, etc. you’re using? Try restarting your server too.

thanks for your reply, sure

Server URL : https://eodp2ijoop23.usemoralis.com:2053/server
Application ID : radrvOXQqWQS2l2awC9RmedNYtxQR5T5etCyD3eQ
Topic : Transfer(address,address,uint256)
ABI :
{“anonymous”:false,“inputs”:[{“indexed”:true,“internalType”:“address”,“name”:“from”,“type”:“address”},{“indexed”:true,“internalType”:“address”,“name”:“to”,“type”:“address”},{“indexed”:false,“internalType”:“uint256”,“name”:“value”,“type”:“uint256”}],“name”:“Transfer”,“type”:“event”}
Address : 0xE5bA47fD94CB645ba4119222e34fB33F59C7CD90

1 Like

When I try syncing this with Sync_historical set to true, I get this error:

The historical data contains more than 500000 rows, If your use-case depends on this amount of data, contact us for a specialized proposal

Have a read here about this error.

Maybe you can add filters to bring the amount of data down.

1 Like

thanks, but I need all that data, is there a method that can save all that data in my server?
and can I upgrade my account with crypto ( like BNB ) ?

you can sync more data, you have to use event sync from code for that for now:
https://docs.moralis.io/moralis-dapp/connect-the-sdk/connect-using-node#add-new-event-sync-from-code

you can use that limit parameter to sync more

for upgrading, you can send an email to [email protected], you can ask there if you can pay with crypto

@cryptokid, @alex
Thanks, now works fine, Perfect platform.
Thanks for your full support again

2 Likes