Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Event logs does not support types for indexed properties  #5208

@nazarhussain

Description

@nazarhussain

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently if we access the event properties via, property name it detects valid type.

(await myContract.events.MyEvent()).on('data', log => {
   console.log(log.returnValues.eventProp1) // will detect valid type 
   console.log(log.returnValues[0]) // will not detect valid type 
});

Expected Behavior

It should detect the type for indexed properties as well.

Steps to Reproduce

Explained above.

Web3.js Version

4.x

Environment

  • Operating System:
  • Browser:
  • Node.js Version:
  • NPM Version:

Anything Else?

I am not sure if this can be done with existing types. But can be looked into further.

Metadata

Metadata

Assignees

Labels

4.x4.0 relatedBugAddressing a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions