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

Polkadot: Bugfix codegen for empty events #1637

Merged
merged 4 commits into from Apr 12, 2024

Conversation

xermicus
Copy link
Contributor

This is an oversight from #1632: The ABI encoder panics when trying to encoding no arguments. Previously, events always contained at least a single byte of data (empty events would have the discriminant/index of the event enum). However now, the data field for empty events is actually empty. So in codegen we check if we have to encode data first and pass a pointer to an empty buffer if not.

…yperledger#1632: The ABI encoder panics when trying to encoding no arguments. Previously, events always contained at least a single byte of data (empty events would have the discriminant/index of the event enum). However now, the data field for empty events is actually empty. So in codegen we check if we have to encode data first and pass a pointer to an empty buffer if not.

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
@xermicus xermicus merged commit 05a6706 into hyperledger:main Apr 12, 2024
11 checks passed
@xermicus xermicus deleted the bugfix-polkadot-empty-events branch April 12, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants