web3
web3 copied to clipboard
How to get Token Balance ?
i want to ERC20 token balance with your module;
similar code for web3p;
$contract = new Contract($web3->provider, $string); $contract->at($contractAddress)->call('balanceOf', $address, function ($err, $account) use (&$balance) { if ($err !== null) { echo 'Error: ' . $err->getMessage(); return; } $balance=goThen($account); });