Example accounts.php.
This commit is contained in:
parent
50a6e4d2a9
commit
06ba7df7ac
@ -10,7 +10,7 @@ $eth->accounts(function ($err, $accounts) use ($eth) {
|
|||||||
echo 'Error: ' . $err->getMessage();
|
echo 'Error: ' . $err->getMessage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach ($accounts->result as $account) {
|
foreach ($accounts as $account) {
|
||||||
echo 'Account: ' . $account . PHP_EOL;
|
echo 'Account: ' . $account . PHP_EOL;
|
||||||
|
|
||||||
$eth->getBalance($account, function ($err, $balance) {
|
$eth->getBalance($account, function ($err, $balance) {
|
||||||
@ -18,7 +18,7 @@ $eth->accounts(function ($err, $accounts) use ($eth) {
|
|||||||
echo 'Error: ' . $err->getMessage();
|
echo 'Error: ' . $err->getMessage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
echo 'Balance: ' . $balance->result . PHP_EOL;
|
echo 'Balance: ' . $balance . PHP_EOL;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user