Add event listening
digitaldonkey opened this issue · 1 comments
digitaldonkey commented
digitaldonkey commented
We actually have that now technically in the Library.
You can pass any FilterChange with your contract to get the Event data.
SmartContract->processLog(FilterChange $filterChange)
But Even better, related to above I wrote some event listener which allows you to
- Process blocks from Block 0 to Blocks in the future
- Use a PHP script to react on any new TX happening onChain
Please check out https://github.com/digitaldonkey/ethereum-php-eventlistener
It has plenty of examples
ethereum-php/src/SmartContract.php
Lines 98 to 124 in 99599d0