at($address); } function getTransferEvents($from = [], $to = [], $fromBlock = 'latest', $toBlock = 'latest') { $toTopic = function ($addr) { $addr = preg_replace('/^0x/', '', $addr); return '0x' . str_pad($addr, 64, '0', STR_PAD_LEFT); }; $from = array_map($toTopic, $from); $to = array_map($toTopic, $to); return $this->queryEvents([EVENTSIG_TRANSFER, $from, $to], $fromBlock, $toBlock); } function getBlockNumber() { $cb = new Callback(); $this->eth->blockNumber($cb); return $cb->result->toString(); } function getTransactionReceipt($tx_hash) { $cb = new Callback(); $this->eth->getTransactionReceipt($tx_hash, $cb); return $cb->result; } }