Fix this.
ofumbi opened this issue · 2 comments
$topic = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
$filter = new \Ethereum\Filter(new Ethereum\EthBlockParam(), new Ethereum\EthBlockParam(), new \Ethereum\EthData($coin->contract_address) , [$topic]);
$filter_id = $ether->eth_newFilter($filter);
No class D in in ethstatic
Problem is in this file, src/Filter.php
line 76
(!is_null($this->topics)) ? $return['topics'] = EthereumStatic::valueArray($this->topics, 'D') : array();
Works after edit
(!is_null($this->topics)) ? $return['topics'] = EthereumStatic::valueArray($this->topics, '\Ethereum\EthD') : array();
src/Filter.php and EthFilter.php are weird duplicates which shouldn't exist both.
But most of all, they are generated functions.
Basically I'm currently reworking the generator code and will have a look on this soon.
https://github.com/digitaldonkey/ethereum-php/blob/master/src/Filter.php
https://github.com/digitaldonkey/ethereum-php/blob/master/src/EthFilter.php
Fixed in dev branch.