web3 icon indicating copy to clipboard operation
web3 copied to clipboard

How to get Token Balance ?

Open mesutgunay opened this issue 3 years ago • 0 comments

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); });

mesutgunay avatar Mar 24 '22 08:03 mesutgunay