You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventEncoder.encode won't create the proper sha3 hash for this Event due to the fact that there is an indexed property after an unindexed property. EventEncoder.encodeorders the parameters by indexed first, which results in the hash being:
ReceivedETH(address,uint8,uint)
but the proper hash used in the Event's tokens will be based on:
ReceivedETH(address,uint,uint8)
I am admittedly new to Ethereum, but based on how I've seen everything working on the blockchain, it seems like this is a bug in Web3j?
To workaround the issue, we just rearranged the parameters on the event definition so that it is compatible with the forced ordering of Web3j:
Say you have an event:
EventEncoder.encode
won't create the proper sha3 hash for this Event due to the fact that there is an indexed property after an unindexed property.EventEncoder.encode
orders the parameters byindexed
first, which results in the hash being:but the proper hash used in the Event's tokens will be based on:
I am admittedly new to Ethereum, but based on how I've seen everything working on the blockchain, it seems like this is a bug in Web3j?
To workaround the issue, we just rearranged the parameters on the event definition so that it is compatible with the forced ordering of Web3j:
The text was updated successfully, but these errors were encountered: