simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
443 stars 273 forks source link

Decode Logs of Receipt #123

Closed KRENERGY closed 3 years ago

KRENERGY commented 3 years ago

Hello,

I have tried to figure out how to decode the logs of a transaction receipt with web3dart, but no successfully. From the web3, my reference is. : web3.eth.abi.decodeLog(inputs, hexString, topics);

I have looked at open / closed issues ; a interesting output for the receipt mgt, but nothing on the 'decodeLog'. Is it that it is not "facilitated" by the userfriendly web3dart and has to be done differently ?

Thanks in advance for your help.

simolus3 commented 3 years ago

Web3Dart can now generate contract classes that decode transaction logs for you. Apart from that, you can use contract.event('EventName').decodeResults() to decode transaction logs into solidity events.