@@ -977,6 +977,39 @@ async def test_eth_getBlockByNumber_finalized(
977977 assert block is not None
978978 assert isinstance (block ["number" ], int )
979979
980+ @pytest .mark .asyncio
981+ async def test_eth_getBlockReceipts_hash (
982+ self , async_w3 : "AsyncWeb3" , async_empty_block : BlockData
983+ ) -> None :
984+ receipts = await async_w3 .eth .get_block_receipts (async_empty_block ["hash" ])
985+ assert isinstance (receipts , list )
986+
987+ @pytest .mark .asyncio
988+ async def test_eth_getBlockReceipts_not_found (self , async_w3 : "AsyncWeb3" ) -> None :
989+ with pytest .raises (BlockNotFound ):
990+ await async_w3 .eth .get_block_receipts (UNKNOWN_HASH )
991+
992+ @pytest .mark .asyncio
993+ async def test_eth_getBlockReceipts_with_integer (
994+ self , async_w3 : "AsyncWeb3" , async_empty_block : BlockData
995+ ) -> None :
996+ receipts = await async_w3 .eth .get_block_receipts (async_empty_block ["number" ])
997+ assert isinstance (receipts , list )
998+
999+ @pytest .mark .asyncio
1000+ async def test_eth_getBlockReceipts_safe (
1001+ self , async_w3 : "AsyncWeb3" , async_empty_block : BlockData
1002+ ) -> None :
1003+ receipts = await async_w3 .eth .get_block_receipts ("safe" )
1004+ assert isinstance (receipts , list )
1005+
1006+ @pytest .mark .asyncio
1007+ async def test_eth_getBlockReceipts_finalized (
1008+ self , async_w3 : "AsyncWeb3" , async_empty_block : BlockData
1009+ ) -> None :
1010+ receipts = await async_w3 .eth .get_block_receipts ("finalized" )
1011+ assert isinstance (receipts , list )
1012+
9801013 @pytest .mark .asyncio
9811014 async def test_eth_get_block_by_number_full_transactions (
9821015 self , async_w3 : "AsyncWeb3" , async_block_with_txn : BlockData
@@ -4224,6 +4257,34 @@ def test_eth_getBlockByNumber_full_transactions(
42244257 transaction = block ["transactions" ][0 ]
42254258 assert transaction ["hash" ] == block_with_txn ["transactions" ][0 ] # type: ignore
42264259
4260+ def test_eth_getBlockReceipts_hash (
4261+ self , w3 : "Web3" , empty_block : BlockData
4262+ ) -> None :
4263+ receipts = w3 .eth .get_block_receipts (empty_block ["hash" ])
4264+ assert isinstance (receipts , list )
4265+
4266+ def test_eth_getBlockReceipts_not_found (self , w3 : "Web3" ) -> None :
4267+ with pytest .raises (BlockNotFound ):
4268+ w3 .eth .get_block_receipts (UNKNOWN_HASH )
4269+
4270+ def test_eth_getBlockReceipts_with_integer (
4271+ self , w3 : "Web3" , empty_block : BlockData
4272+ ) -> None :
4273+ receipts = w3 .eth .get_block_receipts (empty_block ["number" ])
4274+ assert isinstance (receipts , list )
4275+
4276+ def test_eth_getBlockReceipts_safe (
4277+ self , w3 : "Web3" , empty_block : BlockData
4278+ ) -> None :
4279+ receipts = w3 .eth .get_block_receipts ("safe" )
4280+ assert isinstance (receipts , list )
4281+
4282+ def test_eth_getBlockReceipts_finalized (
4283+ self , w3 : "Web3" , empty_block : BlockData
4284+ ) -> None :
4285+ receipts = w3 .eth .get_block_receipts ("finalized" )
4286+ assert isinstance (receipts , list )
4287+
42274288 def test_eth_getTransactionByHash (self , w3 : "Web3" , mined_txn_hash : HexStr ) -> None :
42284289 transaction = w3 .eth .get_transaction (mined_txn_hash )
42294290 assert is_dict (transaction )
0 commit comments