[SOLVED] Moralis Streams emitting modified address

Hey guys,

Iโ€™ve set up streams, and it seems to be working correctly, however for some reason the first few digits of my address (which is an emitted event) shows 0. For example:

This address
0x6C8483B52DD9Cf678d056289623F69cBFEE91875

Shows this:
0x0000000000000000000000006c8483b52dd9cf678d056289623f69cbfee91875

Is this normal or is this an error?
Thanks!

that is the topic for that event probably

Yes, itโ€™s topic. But how can I transfer that to regular address format since I need to assign those addresses as props in my dapp?

0x0000000000000000000000006c8483b52dd9cf678d056289623f69cbfee91875

you get only last 40 characters, this is how you can do it in python

topic = '0x0000000000000000000000006c8483b52dd9cf678d056289623f69cbfee91875'
address = "0x" + topic[-40:]

it can be any topic to contain your address

Thanks! I did some research and this can be done via web3js or ethers as well:

Web3Js

web3.eth.abi.decodeParameter("address", "0x0000000000000000000000002d4cffc2a90e28d90d3404a83bfd774294a3970a");

Ethers