-
Notifications
You must be signed in to change notification settings - Fork 223
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
decodeLogs not work for event logs with struct parameter #61
Comments
Hello. I had a same problem , too. replace _decodeLogs() function.
Output example :
Explanation : This Library decode with "web3-eth-abi" Library. And the problem is dataTypes parameter for abiCoder.decodeParameters();
You know, It's works only single depth tuple. =) |
how to use it for more depth than 1 level tupples? :D |
Decode the input using Then format each item of the output array using this function : Typescript :
|
EDIT : Just decode the paramters using Typescript
|
decodeLogs can not decode events with struct tuple logs, it show empty value.
Environment
$ truffle version
Truffle v5.1.37 (core: 5.1.37)
Solidity - 0.7.1 (solc-js)
Node v10.20.0
Web3.js v1.2.1
Steps to reproduce
node test_abi_decoder.js 0xxxx
Expected behaviour
decodeLogs Should show below output
[ { name: 'd', type: 'tuple', value: [ '100', 'test' ] } ]
Actual behaviour
decodeLogs show empty value
[ { name: 'd', type: 'tuple', value: [] } ]
The text was updated successfully, but these errors were encountered: