Get token balance with Ethereum RPC?
问题 how display balance of token through Ethereum RPC? $id = 0; $data = array(); $data['jsonrpc'] = '2.0'; $data['id'] = $id++; $data['method'] = 'eth_call'; $data['params'] = [['from' => '0x0...', 'to' => '0x0...', 'data' => 'contract byte code here 0x0...'], 'latest']; $ch = curl_init(); ... Return: {"jsonrpc":"2.0","id":0,"result":"0x"} What to do next? Call contract method balanceOf? How to do that? 回答1: To get token balance with eth_call you need to and data parameter. to is contract address