subql icon indicating copy to clipboard operation
subql copied to clipboard

feat: Support custom types (enums/structs) in topic0 encoding for Ethereum events

Open Gmin2 opened this issue 3 months ago • 3 comments

Description

  • Add support for custom Solidity types (enums and structs) in Ethereum event topic0 encoding
  • Automatically resolve enum types to uint8 and struct types to tuple format before keccak256 hashing

Fixes #1772

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist

  • [x] I have tested locally
  • [x] I have performed a self review of my changes
  • [ ] Updated any relevant documentation
  • [x] Linked to any relevant issues
  • [x] I have added tests relevant to my changes
  • [ ] Any dependent changes have been merged and published in downstream modules
  • [x] My code is up to date with the base branch
  • [ ] I have updated relevant changelogs. We suggest using chan

Gmin2 avatar Sep 03 '25 18:09 Gmin2

Hey @stwiname i have made a commit in repo subql-ethereum take a look in it and tell me if thats what yu were looking for and have some doubts there

https://github.com/subquery/subql-ethereum/compare/main...MeshPort-Labs:subql-ethereum:feat/runtime-abi

Gmin2 avatar Sep 04 '25 20:09 Gmin2

@Gmin2, this is looking much better. I think for solving the dictionary issue, it would be best to resolve the filters when the project loads so that the updated filters are available everywhere.

If you create a PR with that work then i can provide more feedback

stwiname avatar Sep 08 '25 01:09 stwiname

Hey @stwiname just made the pr https://github.com/subquery/subql-ethereum/pull/397 take a look at that

Gmin2 avatar Oct 17 '25 10:10 Gmin2