Event does not sync in Database

No past or live event is getting synced in my Moralis Database on this event:
Topic:

CollectionDeposit(address,uint256[],uint256[])

Abi:

{
  "anonymous": false,
  "inputs": [
    {
      "indexed": true,
      "internalType": "address",
      "name": "account",
      "type": "address"
    },
    {
      "indexed": true,
      "internalType": "uint256[]",
      "name": "ids",
      "type": "uint256[]"
    },
    {
      "indexed": true,
      "internalType": "uint256[]",
      "name": "amount",
      "type": "uint256[]"
    }
  ],
  "name": "CollectionDeposit",
  "type": "event"
}

Is there something wrong that I do when I have uint256[] as a type in the event? I did a sync for another event earlier and everything worked fine.

try to use the hash version of the topic instead of that, the hash that you find for topic0 in a block explorer for that event

How can I do that? I did this from the website, not with code.

from the website, you write a hash instead of a string for the topic

first you need to look in a block explorer for that event to see what is the value for topic0, then you copy it in the interface for the topic input

1 Like

So if in the blockchain explorer I have this:


I should copy the Topics 0 in Moralis UI like this:

?

yes, that it is how you can use it

1 Like

Sadly itโ€™s not syncing this way either. Is there anything else to try?

what is the server url?

1 Like

https://3dkekllb7cng.usemoralis.com:2083/

I see this topic there: 0x1e16b8725fea01cbaec7ae2bc6d6c5d5a00c6f3d53ef10d2b0ca8962a546efba
is this intentional?

1 Like

Yes, that is the topic that Iโ€™ve found in the blockchain explorer. Here is the data for the event form remix:

{
		"from": "0x5a5200e55589Ce3F217550190F756d168b61791f",
		"topic": "0x1e16b8725fea01cbaec7ae2bc6d6c5d5a00c6f3d53ef10d2b0ca8962a546efba",
		"event": "CollectionDeposit",
		"args": {
			"0": "0xA4Ad17ef801Fa4bD44b758E5Ae8B2169f59B666F",
			"1": {
				"_isIndexed": true,
				"hash": "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"
			},
			"2": {
				"_isIndexed": true,
				"hash": "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"
			}
		}
	}

there is this error:

Error: overflow (fault="overflow", operation="toNumber", value="80084422859880547211683076133703299733277748156566366325829078699459944778998", code=NUMERIC_FAULT, version=bignumber/5.5.0)

not sure from where is that number

Maybe it tries to turn the hash of the array into a single number instead of an array of numbers? I think the problem would be the uint256 arrays as there is nothing else that could cause it

I donโ€™t know, can you try with a modified version of the abi (one that doesnโ€™t use an array)?

1 Like

I managed to make it sync by making the uint256 arrays not indexed.

1 Like