Skip to content

How to parse "string" from event topics? #1985

Closed Answered by peter-luwig
peter-luwig asked this question in Q&A
Discussion options

You must be logged in to vote

I found the reason, string is hashed when adding to topics since its length is arbitrary. I added that value to data and I can parse it correctly.
Event( "Deposit", listOf( object : TypeReference<Address>(true) {}, object : TypeReference<Utf8String>(true) {}, object : TypeReference<Address>(true) {}, object : TypeReference<Utf8String>(false) {}, object : TypeReference<Uint256>(false) {}, ) )

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by peter-luwig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant