-
Notifications
You must be signed in to change notification settings - Fork 187
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
Event decoding for unnamed parameters is wrong #206
Comments
This line will cause the problem for indexed event parameters. Also this chains ( let mut tokens = Vec::with_capacity(topic_tokens.len() + data_tokens.len());
for input in &event.inputs {
if input.indexed {
tokens.push(topic_tokens.remove(0));
} else {
tokens.push(data_tokens.remove(0));
}
} I could fix this by copying this to |
I don't remember the details of this after I reported it a year ago. We'd surely accept a PR that fixed this but no one is actively working on it. |
A solidity event like
is compiled into an artifact that has a list with these parameters with each one having an empty
""
name. In ethabi's event decoding codeEvent::parse_log
parameters are stored in a hash map of event name to token. This leads to every parameter using a clone of the sameToken
. In this particular case it can cause for example theuint8
to have a value that is larger than 255 because it uses the same token as theuint128
.The text was updated successfully, but these errors were encountered: