How is Harmony extracting "Suggested Event" from transaction logs

I’m extracting data from Log events but many do not follow the ERC20 standard ABI.

For example the logs in this transaction - If I try to decode the log with web3 AbiCoder.decodeLog(...) and use the ERC20 ABI it fails. But when I review the log on the Harmony Block Explorer (linked above) it shows:
Suggested Event: Approval(address,address,uint256)
Suggested Event: Transfer(address,address,uint256)

How is it abstracting this data? Are the ABI’s published somewhere for those contracts? Any help appreciated.

1 Like

If a contracts publishes is abi it will be on under the contract tab

Other than that, you can search the github and compile the contract to get the abi.

Can you programmatically get the ABI for the contract with an API request? I’d like to avoid manually grabbing every ABI or writing a scraper. I think I’m also curious how harmony is writing the logic for Suggested Event

The only way to get an ABI is if it is published on the explorer.

You can try directly connecting to the api via

For Example:




Example Python Code:

You will get the ABI AND the full contract code if it exists…

This is great, thank you! The example I posted uses this contract address 0x5f753dcdf9b1ad9aabc1346614d1f4746fd6ce5c

It seems like it’s published to Harmony here but the API returns Contract not found. Any thoughts? Does it need to be verified or did I misread the contract wrong on Harmony

My post was flagged and now I can’t reply with links?

1 Like

I got this DM lol…


This is an automated message from Harmony Community Forum to let you know that your post was hidden.

Your post was flagged as spam : the community feels it is an advertisement, something that is overly promotional in nature instead of being useful or relevant to the topic as expected.

This post was hidden due to flags from the community, so please consider how you might revise your post to reflect their feedback. You can edit your post after 10 minutes, and it will be automatically unhidden.

However, if the post is hidden by the community a second time, it will remain hidden until handled by staff.

For additional guidance, please refer to our community guidelines.

Must be some mistake>??

You can DM if you like…

You can look up event IDs in the to get suggested events. AFAIK that’s how the explorer does it