0

I am currently trying to decode the 'data' field of transaction logs.

Decoding topics with web3.eth.abi.decodeParameters works fine, but when I pass a "type" or an array, similar to that I pass to yield topics, it throws an error:

reason: 'invalid arrayify value',

What do I do to decode the data?

Thanks in advance

1 Answer 1

1

So, all I needed to do was read the docs here.

Essentially, you use the web3.eth.abi.decodeLog([abi ,][ dataFieldFromLog ,][ topicsFieldFromLog]) which returns data and topics in an accessible array 👏

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.