File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff 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+ ```
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments