Fixes for event log and event handling
These commits fix the following issues:
Ethereum.php does not handle eth_getLogs at all
Fixed by added an OR with the handling of eth_getFilterChanges as they return the same JSON-RPC array.
Event.php does not handle dynamic bytes properly
Fixed by correctly applying offsets for dynamic bytes. Decoded in accordance with https://docs.soliditylang.org/en/latest/abi-spec.html
SmartContract.php does not allow for processLog to disable event calls
Added bool to allow developers to disable event calls if they want to handle $event differently.
Sorry it takes so long. Currently redoing my CI so I hope I can continuer with this soon.

I can see there is a eth_getLogs method (which does not necessarily mean that it is working well..). The approach to fix it is a little stange, as it is one of the generated functions. Can you provide test data for your case so that I may be able to write a unit test for it?
Can you do a micro-change, so that the new circleci pipeline gets triggered and we get a run with unit tests.
// Using the Binance Smart Chain
$web3 = new Ethereum('https://bsc-dataseed4.binance.org/');
// ABI - https://bscscan.com/address/0x22663e2bbf6524dbbe1fb14a84eb689ca65ef367#code
$contractMeta = json_decode(file_get_contents(APP . '/config/contract_bsc.json'));
$contracts["Contract"] = new NFT(
$contractMeta->abi,
$contractMeta->address,
$web3
);
$logs = $web3->eth_getLogs(new Filter(new EthBlockParam(7858017), new EthBlockParam(7858342), new EthBytes("0x22663e2bbf6524dbbe1fb14a84eb689ca65ef367"), null));
foreach($logs as $filterChange) {
// Fails here
$event = $contracts["Contract"]->processLog($filterChange, false);
var_dump($event);
}
I found that it was failing on processing the logs after obtaining them because the eth_getLogs was not handled in your original code.
Sorry. Forgot to mention, that you need to pull the master branch to get the new CircleCi config
Sorry. Forgot to mention, that you need to pull the master branch to get the new CircleCi config
Rebased.
Jay. It doesn't break anything :D I'm so happy to have a pipeline again. But I will need to understand what the difference between the original approach (screenshot) and your solution ist. It had been a while. Thank you for the test data. This will help.