From 294228661077cb977d3d2d53c1a8c00d7bdcf489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B9=8B=E7=BE=8E?= Date: Tue, 1 Sep 2020 00:04:58 +0800 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 1624904..9341519 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,20 @@ $personal->provider->execute(function ($err, $data) { // do something }); ``` +contract +```php +$contract->batch(true); +foreach ($accounts as $account) { + $contract->call('balanceOf', $account); +} + +$contract->eth->provider->execute(function ($err, $data) use ($accounts) { + if ($err !== null) { + throw new $err; + } + print_r($data); +}); +``` ### Contract