provider, $erc20TokenABI);
$contract->at($erc20TokenAddress)->call('symbol', function ($err, $result) {
if ($err !== null) { return; }
echo 'The symbol: ' . $result[0];
});
$contract->at($erc20TokenAddress)->call('balanceOf', [$accountAddress], function($err, $result) {
if ($err !== null) {
echo 'Error: ' . $err->getMessage() . PHP_EOL;
// return;
}
// Print balance
print_r($result);
});
The symbol: WTM
PHP Warning: Array to string conversion in D:\xampp\htdocs\web3.php-master\src\Contracts\Types\Address.php on line 63
Warning: Array to string conversion in D:\xampp\htdocs\web3.php-master\src\Contracts\Types\Address.php on line 63
PHP Fatal error: Uncaught InvalidArgumentException: Please make sure you have put all function params and callback. in D:\xampp\htdocs\web3.
.php-master\src\Contract.php:625