小编ais*_*tes的帖子

使用以太坊RPC获取令牌余额?

如何通过以太坊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();
...
Run Code Online (Sandbox Code Playgroud)

返回:

{"jsonrpc":"2.0","id":0,"result":"0x"}
Run Code Online (Sandbox Code Playgroud)

接下来做什么?呼叫合同方法balanceOf?怎么做?

php token blockchain ethereum

3
推荐指数
2
解决办法
5138
查看次数

标签 统计

blockchain ×1

ethereum ×1

php ×1

token ×1