File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,13 @@ public function getTransactionByHash(string $hash): TransactionByHashInfo
6565 /**
6666 * @see https://docs.etherscan.io/api-endpoints/geth-parity-proxy#eth_blocknumber
6767 */
68- public function getBlockNumber (): string
68+ public function getBlockNumber (): int
6969 {
7070 $ response = $ this ->client ->sendRequest (self ::MODULE_NAME , 'eth_blockNumber ' );
7171 /** @var array{result: string} $json */
7272 $ json = json_decode ($ response ->getBody ()->getContents (), true );
7373
74- return $ json ['result ' ];
74+ return ( int ) hexdec ( $ json ['result ' ]) ;
7575 }
7676
7777 /**
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ public function it_retrieves_block_number(): void
196196 )
197197 ->willReturn (new Response (200 , [], $ json ));
198198 $ result = $ this ->proxy ->getBlockNumber ();
199- $ this ->assertSame (' 0xc36b29 ' , $ result );
199+ $ this ->assertSame (12806953 , $ result );
200200 }
201201
202202 #[Test]
You can’t perform that action at this time.
0 commit comments