Being "token" below a contract instance, i do:
token.getPastEvents('OperationEvent', {fromBlock:68000000, filter: {productId: '0xe69cc33407fbe7f7d9bcc423d83da743843bcae7e19a7d20bfd38170f30f53f0'}})
Getting:
Error: invalid argument 0: hex has invalid length 160 after decoding; expected 32 for topic
The hex string sent is the result of "web3.utils.sha3()" for the original string topic. If i request all events from that contract i can see that the topic reported in the event i'm looking for perfectly matches the hex string i'm sending.
I suppose i'm just generating the topic the wrong way, but can't find anything in the docs or googling. ¿Any clue on how to get this right (filtering past events of a contract by an string topic)?