[SOLVED] Why are upgradeable contract events not decoded (streams)?

Just wondering, after successfully creating a stream for a normal (non-upgradeable) contract, I tried creating a stream for an upgradeable one, but the data that is delivered to my backend isn’t decoded (it is in format “data”, “address”, “topic0”, “topic1” etc.). Just wondering, is the following how it’s supposed to be done:

  1. Use proxy contract address
  2. Use implementation contract abi?

I tried using the entire implementation contract abi as well as using only the event that I need, but no luck. Is there maybe a special way to configure streams with upgradeable contracts?

can you give an example of the output that you got when it was decoded and when it was not decoded?

Basically I get encoded data under logs field. This is encoded (Moralis detected the event and sent the request, but it did not decode the data despite having the abi):

“data”:“0x0000000000000000000000000000000000000000000000000023b1b188e66429”,“topic0”:“0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d”,“topic1”:“0x00000000000000000000000044e136d06b607fd23f751ce9937a53b7133d6db1”

I would like to get this data in decoded format like I do with good old webhooks. So Instead of the hex values above I would get actual values that were emitted in the event. Not sure if that’s possible in streams?

Also I just realized that I always get encoded data, even in non-upgradeable contracts. Not sure why is that.

It looked like it’s decoded, but it’s because I was reading the nftTransfers field. But logs are encoded in both cases.

you can decode that data locally on your side with ethers

So it can’t be decoded by Moralis? :frowning:

you can use something like this

I think that the sdk had an option to decode the logs after you get them

I’ll check it out, thanks a lot for helping