Skip to content

Commit 6514ddd

Browse files
committed
doc: update README.md
1 parent 9470113 commit 6514ddd

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,9 @@ $blockInfo = $etherscan->proxy->getBlockByNumber('0x10d4f');
126126
```php
127127
$result = $this->proxy->sendRawTransaction('0xf904808000831cfde080');
128128
```
129+
130+
[eth_getBlockTransactionCountByNumber](https://docs.etherscan.io/api-reference/endpoint/ethgetblocktransactioncountbynumber):
131+
132+
```php
133+
$result = $this->proxy->getBlockTransactionCountByNumber('0x10FB78');
134+
```

src/Module/Proxy/Proxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function sendRawTransaction(string $hex): string
150150
/**
151151
* @see https://docs.etherscan.io/api-endpoints/geth-parity-proxy#eth_getblocktransactioncountbynumber
152152
*/
153-
public function getTransactionCountByNumber(string $hexBlockNumber): BigInteger
153+
public function getBlockTransactionCountByNumber(string $hexBlockNumber): BigInteger
154154
{
155155
$response = $this->client->sendRequest(self::MODULE_NAME, 'eth_getBlockTransactionCountByNumber', ['tag' => $hexBlockNumber]);
156156
/** @var array{result: string} $json */

tests/Module/ProxyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public function it_retrieves_transaction_count_for_block(): void
345345
}),
346346
)
347347
->willReturn(new Response(200, [], $json));
348-
$result = $this->proxy->getTransactionCountByNumber('0x10FB78');
348+
$result = $this->proxy->getBlockTransactionCountByNumber('0x10FB78');
349349
$this->assertTrue((new BigInteger('0x3', 16))->equals($result));
350350
}
351351

0 commit comments

Comments
 (0)