Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone 3. Events with indexed fields are not encoded correctly #970

Closed
xermicus opened this issue Aug 18, 2022 · 2 comments · Fixed by #1064
Closed

Milestone 3. Events with indexed fields are not encoded correctly #970

xermicus opened this issue Aug 18, 2022 · 2 comments · Fixed by #1064
Assignees
Labels
bug Something isn't working polkadot Concerns the Polkadot target

Comments

@xermicus
Copy link
Contributor

If an event has fields declared indexed, they should be passed into the Substrate topics. This is not implemented correctly today. Ensure that indexed fields are passed into topics and add an integration test for this at

https://github.com/hyperledger-labs/solang/tree/main/integration/substrate

Success means that a pull request has had all its review comments addressed and it is merged.

@xermicus xermicus added bug Something isn't working polkadot Concerns the Polkadot target labels Aug 18, 2022
@xermicus xermicus self-assigned this Aug 18, 2022
@xermicus xermicus added this to the ink! v4 compatibility milestone Oct 5, 2022
@xermicus
Copy link
Contributor Author

xermicus commented Nov 6, 2022

This is not implemented correctly today.

@seanyoung before I start digging here, do you remember some more insights or hints on this one?

@seanyoung
Copy link
Contributor

I recall that there are a few issues.

  • Substrate requires topic values to be unique, and solang does not enforce this
  • The code gen in src/emit/ is not correct, and sometimes event emitting does not work at all (unfortunately I don't have a test case)
  • I don't think the semantics of events on Solidity and Substrate/Ink! match properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working polkadot Concerns the Polkadot target
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants