
    (iL                    l   d dl Z d dlZd dlZd dlZd dlmZ d dlZd dlmZm	Z	m
Z
mZmZmZmZ d dlZd dlmZmZmZmZ d dlmZmZmZmZmZmZmZmZmZm Z  d dl!m"Z"m#Z# d dl$m%Z% d dl&m'Z' d d	l(m)Z) d d
l*m+Z+ d dl,m-Z- d dl.m/Z/m0Z0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZF d dlGmHZHmIZI d dlJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZT  e e ed                  ZU ed      ZVdZWdZXdZYdZZerd dl[m\Z\ d dl]m^Z^m_Z_ d dl`maZambZb ded   ded   defd Zc G d! d"      Zd G d# d$      Zey)%    N)randint)TYPE_CHECKINGAnyCallableListTypeUnioncast)BlockNumberChecksumAddress
HexAddressHexStr)

is_booleanis_bytesis_checksum_addressis_dict
is_integeris_list_likeis_same_address	is_stringremove_0x_prefixto_bytes)assocmerge)HexBytes)ens_addresses)PANIC_ERROR_CODES)PRIORITY_FEE_MIN)to_hex_if_integer)assert_contains_log+async_mock_offchain_lookup_request_response%mock_offchain_lookup_request_response)RequestMocker)to_hex_if_bytes)BlockNotFoundContractCustomErrorContractLogicErrorContractPanicErrorInvalidAddressInvalidTransactionMultipleFailedRequestsNameNotFoundOffchainLookupTimeExhaustedTooManyRequestsTransactionNotFoundTransactionTypeMismatchWeb3RPCErrorWeb3ValidationErrorWeb3ValueError)ExtraDataToPOAMiddlewareSignAndSendRawMiddlewareBuilder)
ENS	BlockDataFilterParamsNonceRPCEndpointStateOverrideParams
SyncStatusTxDataTxParamsWei*0xdEADBEeF00000000000000000000000000000000B0xdeadbeef000000000000000000000000000000000000000000000000000000000x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001474657374206f6666636861696e206c6f6f6b7570000000000000000000000000
0x556f1830   00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a0da96d05a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f776562332e70792f676174657761792f7b73656e6465727d2f7b646174617d2e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001768747470733a2f2f776562332e70792f6761746577617900000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001474657374206f6666636861696e206c6f6f6b757000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001474657374206f6666636861696e206c6f6f6b75700000000000000000000000000x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000067765623370790000000000000000000000000000000000000000000000000000)MonkeyPatch)AsyncContractContract)	AsyncWeb3Web3w3)rK   AsyncWeb3[Any]offchain_lookup_contract)rI   rH   returnc                     t        t        | j                  t        j                  dgt        |j                        g                        S )Naddresshexstr)r   r   to_hexabiencoder   rQ   )rL   rN   s     V/var/www/br/venv/lib/python3.12/site-packages/web3/_utils/module_testing/eth_module.py,abi_encoded_offchain_lookup_contract_addressrX      sH     II

K%=%E%EFG	
	 	    c                   Z$   e Zd Zej                  j
                  dd       Zej                  j
                  dd       Zej                  j
                  dddeddfd       Z	ej                  j
                  dddeddfd	       Z
ej                  j
                  dddeddfd
       Zej                  j
                  dddeddfd       Zej                  j
                  dddededgdf   ddfd       Zej                  j
                  dddededgdf   ddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddee   ddfd       Zej                  j
                  dddeddfd       Z ej                  j
                  dddeddfd        Z!ej                  j
                  ddded!d"ddfd#       Z"ej                  j
                  dddeddfd$       Z#ej                  j
                  dddeddfd%       Z$ej                  j
                  ej                  jK                  d&d'd(d)g*      ddded&e&ddfd+              Z'ej                  j
                  dddeddfd,       Z(ej                  j
                  dddeddfd-       Z)ej                  j
                  ej                  jK                  d.d/d/ ed0       ed0d1        ed0d1       id2 ed3       ed3      d4 ed0d1        ed0d1       id5f      ddd!d"d.e*ddfd6              Z+ej                  j
                  dd7       Z,ej                  j
                  ddd8e-ddfd9       Z.ej                  j
                  	 	 	 	 dd:       Z/ej                  j
                  dd;       Z0ej                  j
                  dddee   ddfd<       Z1ej                  j
                  ddd8e-ddfd=       Z2ej                  j
                  	 	 	 	 dd>       Z3ej                  j
                  dd?       Z4ej                  j
                  ddd8e-ddfd@       Z5ej                  j
                  ddd8e-ddfdA       Z6ej                  j
                  ddd8e-ddfdB       Z7ej                  j
                  ddd8e-ddfdC       Z8ej                  j
                  ddd8e-ddfdD       Z9ej                  j
                  ddd8e-ddfdE       Z:ej                  j
                  ddd8e-ddfdF       Z;ej                  j
                  ddd8e-ddfdG       Z<ej                  j
                  	 	 	 	 ddH       Z=ej                  j
                  ddd8e-ddfdI       Z>ej                  j
                  ddd8e-ddfdJ       Z?ej                  j
                  ddd8e-ddfdK       Z@ej                  j
                  dddLe-ddfdM       ZAej                  j
                  dddNeddfdO       ZBej                  j
                  	 	 	 	 ddP       ZCej                  j
                  dddLe-deddfdQ       ZDej                  j
                  ej                  jK                  dRdSeEf      dddReFeGeHf   ddfdT              ZIej                  j
                  	 	 	 	 ddU       ZJej                  j
                  ddV       ZKej                  j
                  dddWeddfdX       ZLej                  j
                  	 	 	 	 	 	 ddY       ZMej                  j
                  	 	 	 	 	 	 dd[       ZNej                  j
                  ddded!d"ddfd\       ZOej                  j
                  dddeddfd]       ZPej                  j
                  	 	 	 	 	 	 dd^       ZQej                  j
                  	 	 	 	 	 	 dd`       ZRej                  j
                  ej                  jK                  d.d/d/ ed0       ed0d1        ed0d1       id2 ed3       ed3      d4 ed0d1        ed0d1       id5f      ddd!d"d.e*ddfda              ZSej                  j
                  	 	 	 	 	 	 ddb       ZTej                  j
                  ddd_d"deddfdc       ZUej                  j
                  ddd_d"deddfdd       ZVej                  j
                  ddd_d"deddfde       ZWej                  j
                  ddd_d"deddfdf       ZXej                  jK                  dgdhg fdig fdjdkgfdldmgfdng fdog fdpg fdqg fdrg ff	      ej                  j
                  dddsd"dteYd.eZe[   ddf
du              Z\ej                  j
                  dddvd"dedwdxddf
dy       Z]ej                  j
                  	 	 	 	 	 	 ddz       Z^ej                  j
                  dddvd"dedwdxddf
d{       Z_ej                  j
                  ej                  jK                  d| e`dmd}            dddvd"d|eGddfd~              Zaej                  j
                  dddvd"dedwdxddf
d       Zbej                  j
                  ej                  jK                  dg d      dddvd"dedwdxdeGddfd              Zcej                  j
                  dddvd"dedwdxddf
d       Zdej                  j
                  	 	 	 	 dd       Zeej                  j
                  	 	 	 	 	 	 dd       Zfej                  j
                  dd       Zgej                  j
                  dd       Zhej                  j
                  dddLe-dNeddfd       Ziej                  j
                  dddeddfd       Zjej                  j
                  ddde-dZd"deddf
d       Zkej                  j
                  dddLe-dNeddfd       Zlej                  j
                  ej                  j                  dd      dddeddfd              Znej                  j
                  ddde-dZd"deddf
d       Zoej                  j
                  dd       Zpej                  j
                  dd       Zqej                  j
                  ddde-ddfd       Zrej                  j
                  ddde-dededdf
d       Zsej                  j
                  ddde-dededdf
d       Ztej                  j
                  	 	 	 	 dd       Zuej                  j
                  dd       Zvej                  j
                  	 	 	 	 	 	 dd       Zwej                  j
                  	 	 	 	 	 	 dd       Zxej                  j
                  	 	 	 	 dd       ZydddeddfdZz	 	 	 	 ddZ{ej                  j
                  ddd8e-ddfd       Z|ej                  j
                  ddd8e-ddfd       Z}ej                  j
                  dddLe-ddfd       Z~ej                  j
                  ddd8e-ddfd       Zej                  j
                  ddd8e-ddfd       Zej                  j
                  dddLe-ddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dddeddfd       Zej                  j
                  dd       Zej                  j
                  dd       Zej                  j
                  	 	 	 	 dd       Zej                  j
                  dd       Zy)AsyncEthModuleTestasync_w3rM   rO   Nc                 Z   K   |j                   j                   d {   }|dkD  sJ y 7 wNr   )eth	gas_price)selfr\   r`   s      rW   test_eth_gas_pricez%AsyncEthModuleTest.test_eth_gas_price   s)     ",,000	1}} 1   +)+c                 L   K   |j                          d {   }|du sJ y 7 wNT)is_connected)ra   r\   rf   s      rW   test_is_connectedz$AsyncEthModuleTest.test_is_connected   s*     %2244t### 5s   $"$'async_keyfile_account_address_dual_typec                   K   ||t        d      d|j                  j                   d {   d}|j                  j                  |       d {   }|j                  j	                  |       d {   }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d   dk(  sJ |d   |d   k(  sJ y 7 7 7 nw)	N   R  fromtovaluegasgasPricerm   rn   ro   rp   rq   )r@   r_   r`   send_transactionget_transactionr   r
   r   ra   r\   rh   
txn_paramstxn_hashtxns         rW    test_eth_send_transaction_legacyz3AsyncEthModuleTest.test_eth_send_transaction_legacy   s      <9V&ll444 

 "66zBBLL00::s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""":*Z"8888 5B:s4   'C"C$C"C"C"1C 2A+C"C" C"c                 X  K   ||t        d      d|j                  dd      d}|j                  j                  |       d {   }|j                  j	                  |t        t         |d   dz        t        d             d {   }|j                  j                  |       d {   }t        |d   t        t        |d               sJ t        |d	   t        t        |d	               sJ |d
   dk(  sJ |d   dk(  sJ |d   t        t        |d         dz  k(  sJ y 7 7 7 wNrj   rk   gweirl   rq      )rq   ro   rm   rn   ro   rp   
r@   to_weir_   rr   modify_transactionr
   rs   r   r   intra   r\   rh   ru   rv   modified_txn_hashmodified_txns          rW   "test_eth_modify_transaction_legacyz5AsyncEthModuleTest.test_eth_modify_transaction_legacy   sQ     <9V 6 

 "66zBB"*,,"A"AS*Z*@1*D EcRSf #B #
 
 &\\99:KLL $
68J"K
 	
 
 _j6F G
 	
 
 G$)))E"e+++J'4Z
5K+Lq+PPPP C
 Ms8   A D*D$AD*D&"D*(D()A<D*&D*(D*c           
        K   ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |       d {   }|j                  j	                  |t        d      t        t         |d   dz        t        t         |d   dz               d {   }|j                  j                  |       d {   }t        |d	   t        t        |d	               sJ t        |d
   t        t        |d
               sJ |d   dk(  sJ |d   dk(  sJ |d   t        t         |d         dz  k(  sJ |d   t        t         |d         dz  k(  sJ y 7 7 7 wNrj   rk   r{   r|   )rm   rn   ro   rp   maxPriorityFeePerGasmaxFeePerGasr   r   )ro   r   r   rm   rn   ro   rp   	r@   r~   r_   rr   r   r
   rs   r   r   r   s          rW   test_eth_modify_transactionz.AsyncEthModuleTest.test_eth_modify_transaction   s     <9V$,OOAv$>$OOAv6 

 "66zBB"*,,"A"Aa&"&sJ7M,NQR,R"SsJ~$>$BC	 #B #
 
 &\\99:KLL $
68J"K
 	
 
 _j6F G
 	
 
 G$)))E"e+++/0C$:;<q@A	
A N+tCN9S/TWX/XXXX- C
 Ms8   AE/E(AE/+E+,"E/E-BE/+E/-E/c           	        K   ||t        d      d|j                  dd      |j                  dd      t        d      d}|j                  j	                  |       d {   }|j                  j
                  j                  |d         }||k(  sJ |d   d	   |d	   k(  sJ |d   d
   |d
   k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ y 7 wNrj   rk   r|   r{   r   rm   rn   ro   rp   r   r   noncerawtxrn   ro   rp   r   r   r   r@   r~   r:   r_   sign_transactionaccountrecover_transaction)ra   r\   rh   ru   resultsignatory_accounts         rW   test_async_eth_sign_transactionz2AsyncEthModuleTest.test_async_eth_sign_transaction   s;     <9V$OOAv6$,OOAv$>1X 

  ||44Z@@$LL00DDVE]S6:KKKKd|D!Z%5555d|G$
7(;;;;d|E"j&7777d|N+z./IIII4L/0J?U4VV	
Vd|G$
7(;;;; As   AC4C2BC4async_skip_if_testrpcc                    K   d} ||       t        |j                  j                  |t        j                  |             d {         }t        |      dk(  sJ y 7 wNa   
            {
                "types": {
                    "EIP712Domain": [
                        {"name": "name", "type": "string"},
                        {"name": "version", "type": "string"},
                        {"name": "chainId", "type": "uint256"},
                        {"name": "verifyingContract", "type": "address"}
                    ],
                    "Person": [
                        {"name": "name", "type": "string"},
                        {"name": "wallet", "type": "address"}
                    ],
                    "Mail": [
                        {"name": "from", "type": "Person"},
                        {"name": "to", "type": "Person"},
                        {"name": "contents", "type": "string"}
                    ]
                },
                "primaryType": "Mail",
                "domain": {
                    "name": "Ether Mail",
                    "version": "1",
                    "chainId": "0x01",
                    "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                },
                "message": {
                    "from": {
                        "name": "Cow",
                        "wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
                    },
                    "to": {
                        "name": "Bob",
                        "wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"
                    },
                    "contents": "Hello, Bob!"
                }
            }
        A   r   r_   sign_typed_datajsonloadslen)ra   r\   rh   r   validJSONMessage	signatures         rW   test_eth_sign_typed_dataz+AsyncEthModuleTest.test_eth_sign_typed_data  sb     &N 	h',,..7DT9U 
	
 9~,,,	s   AA AA c                    K    ||       d}t        j                  t        d      5  |j                  j	                  |t        j                  |             d {    d d d        y 7 # 1 sw Y   y xY wwNa  
            {
                "types": {
                    "EIP712Domain": [
                        {"name": "name", "type": "string"},
                        {"name": "version", "type": "string"},
                        {"name": "chainId", "type": "uint256"},
                        {"name": "verifyingContract", "type": "address"}
                    ],
                    "Person": [
                        {"name": "name", "type": "string"},
                        {"name": "wallet", "type": "address"}
                    ],
                    "Mail": [
                        {"name": "from", "type": "Person"},
                        {"name": "to", "type": "Person[2]"},
                        {"name": "contents", "type": "string"}
                    ]
                },
                "primaryType": "Mail",
                "domain": {
                    "name": "Ether Mail",
                    "version": "1",
                    "chainId": "0x01",
                    "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
                },
                "message": {
                    "from": {
                        "name": "Cow",
                        "wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
                    },
                    "to": [{
                        "name": "Bob",
                        "wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"
                    }],
                    "contents": "Hello, Bob!"
                }
            }
        z<.*Expected 2 items for array type Person\[2\], got 1 items.*matchpytestraisesr4   r_   r   r   r   )ra   r\   rh   r   invalid_typed_messages        rW    test_invalid_eth_sign_typed_dataz3AsyncEthModuleTest.test_invalid_eth_sign_typed_dataM  sz      	h'&!N ]]Q
 	 ,,..7

01  		 			 	s.   &A73A+A)A+ 	A7)A++A40A7async_keyfile_account_addressc                   K   ||t        d      d|j                  j                   d {   t        d      d}|j                  j	                  |       d {   }|j                  j
                  j                  |d         }||k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ |d   d	   |d	   k(  sJ |d   d
   |d
   k(  sJ |d   d   |d   k(  sJ y 7 7 wNrj   rk   r   )rm   rn   ro   rp   rq   r   r   r   rn   ro   rp   rq   r   r@   r_   r`   r:   r   r   r   ra   r\   r   ru   r   r   s         rW   &test_async_eth_sign_transaction_legacyz9AsyncEthModuleTest.test_async_eth_sign_transaction_legacy  s    
 2/V&ll4441X 

  ||44Z@@$LL00DDVE]S,0AAAAd|D!Z%5555d|G$
7(;;;;d|E"j&7777d|J':j+AAAAd|G$
7(;;;; 5 As"   'C!C.C!CBC!C!c                 \  K   ||t        d      dt        |j                  dd            t        |j                  dd            t        d      d}|j                  j                  |       d {   }|j                  j                  j                  |d         }||k(  sJ |d   d	   |d	   k(  sJ |d   d
   |d
   k(  sJ |d   d   |d   k(  sJ |d   d   t        t        |d         d      k(  sJ |d   d   t        t        |d         d      k(  sJ |d   d   |d   k(  sJ y 7 wNrj   rk   r|   r{   r   r   r   r   rn   ro   rp   r      r   r   
r@   hexr~   r:   r_   r   r   r   r   strr   s         rW   (test_async_eth_sign_transaction_hex_feesz;AsyncEthModuleTest.test_async_eth_sign_transaction_hex_fees  sg    
 2/V6 :;$'6(B$C1X 

  ||44Z@@$LL00DDVE]S,0AAAAd|D!Z%5555d|G$
7(;;;;d|E"j&7777d|N+s3z.7Q3RTV/WWWWd|23s
123R8
 
 	
 
 d|G$
7(;;;; As   A-D,/D*0B;D,c           
      .  K   t        |d|i      5  ddt        d      d|j                  dd      |j                  dd      t        d      d}|j                  j                  |       d {   }|j                  j                  j                  |d         }||k(  sJ |d	   d
   |k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ 	 d d d        y 7 # 1 sw Y   y xY wwNzunlocked-account.ethrj   rk   r|   r{   r   r   r   r   rn   ro   rp   r   r   r   r   r@   r~   r:   r_   r   r   r   r   s         rW   )test_async_eth_sign_transaction_ens_namesz<AsyncEthModuleTest.test_async_eth_sign_transaction_ens_names  st     -/LM
 	@ /,Q (6 :(06(Bq$J $<<88DDF ( 4 4 H HPU W04EEEE$<%)FFFF$<(Jw,????$<&*U*;;;;$</:n3MMMMt344566 $<(Jw,????/	@ 	@ E	@ 	@s0   DAD	,D-BD	>	DD		DDc           	        K   ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |       d {   }|j                  j	                  |       d {   }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d	   dk(  sJ |d
   |d
   k(  sJ |d   |d   k(  sJ |d   |d
   k  sJ y 7 7 wNrj   rk      r{   rm   rn   ro   rp   r   r   rm   rn   ro   rp   r   r   rq   r@   r~   r_   rr   rs   r   r
   r   rt   s         rW   test_eth_send_transactionz,AsyncEthModuleTest.test_eth_send_transaction  s"     <9V$OOAv6$,OOAv$> 

 "66zBBLL00::s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""">"j&@@@@)*j9O.PPPP:#n"5555 C:s%   AC?C;"C?6C=7BC?=C?c                   K   ||t        d      dd}|j                  j                  |       d {   }|j                  j                  |       d {   }t	        |d   t        t        |d               sJ t	        |d   t        t        |d               sJ |d   dk(  sJ |d   dk(  sJ t        |d         sJ t        |d	         sJ |d
   |d	   k  sJ y 7 7 wNrj   rk   rm   rn   ro   rp   rm   rn   ro   rp   r   r   rq   r@   r_   rr   rs   r   r
   r   r   rt   s         rW   &test_eth_send_transaction_default_feesz9AsyncEthModuleTest.test_eth_send_transaction_default_fees  s      <9V	 

 "66zBBLL00::s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU"""#45666#n-...:#n"5555 C:s"   /C#C"C#C!BC#!C#c                   K   ||t        d      dt        d      t        d      d}|j                  j                  |       d {   }|j                  j	                  |       d {   }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d	   dk(  sJ |d
   dk(  sJ |d   dk(  sJ y 7 7 swNrj   rk       DRj  5wr   rm   rn   ro   rp   r   r   r@   r   r_   rr   rs   r   r
   r   rt   s         rW   "test_eth_send_transaction_hex_feesz5AsyncEthModuleTest.test_eth_send_transaction_hex_fees  s      <9V,$'	N 

 "66zBBLL00::s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""">"k111)*i777 C:s%   ACC"C(C)A2CCc                   K   ||t        d      t        d      t        d      d}|j                  j                  |       d {   }|j                  j                  |       d {   }t	        |d   t        t        |d               sJ t	        |d   t        t        |d               sJ |d   dk(  sJ |d   d	k(  sJ y 7 7 _w
Nrj   r   r   )rm   rn   ro   r   r   rm   rn   ro   rp   i r@   r_   rr   rs   r   r
   r   rt   s         rW    test_eth_send_transaction_no_gasz3AsyncEthModuleTest.test_eth_send_transaction_no_gas  s      <9V,$'	N 

 "66zBBLL00::s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zV### C:%   AC	C"C	'C(AC	C	c           	        K   ||t        d      dt        d      t        d      t        d      d}t        j                  t              5  |j                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY wwNrj   rk   r   r   )rm   rn   ro   rp   rq   r   r   r@   r   r   r1   r_   rr   ra   r\   rh   ru   s       rW   (test_eth_send_transaction_with_gas_pricez;AsyncEthModuleTest.test_eth_send_transaction_with_gas_price/  sy      <9VA,$'	N 

 ]]23 	<,,//
;;;	< 	<;	< 	<s0   AB
A9)A7*A9.	B7A99B>Bc                    K   ||t        d      dt        d      d}t        j                  t        d      5  |j                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY wwNrj   rk   r   rm   rn   ro   rp   r   $maxPriorityFeePerGas must be definedr   r@   r   r   r*   r_   rr   r   s       rW   )test_eth_send_transaction_no_priority_feez<AsyncEthModuleTest.test_eth_send_transaction_no_priority_feeA  st      <9V, 

 ]]&L
 	< ,,//
;;;	< 	< <	< 	<s.   6A3A'A%A'	A3%A''A0,A3c                   K   |j                  dd      }||t        d      d|d}|j                  j                  |       d {   }|j                  j	                  |       d {   }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d	   dk(  sJ y 7 7 _w)
Nr|   r{   rj   rk   rm   rn   ro   rp   r   rm   rn   ro   rp   )r~   r@   r_   rr   rs   r   r
   r   )ra   r\   rh   r   ru   rv   rw   s          rW   $test_eth_send_transaction_no_max_feez7AsyncEthModuleTest.test_eth_send_transaction_no_max_feeS  s       (q&9;9V$8 

 "66zBBLL00::s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""" C:r   c                    K   ||t        d      dt        d      t        d      d}t        j                  t        d      5  |j                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY wwNrj   rk    ʚ;r   r   z,maxFeePerGas must be >= maxPriorityFeePerGasr   r   r   s       rW   /test_eth_send_transaction_max_fee_less_than_tipzBAsyncEthModuleTest.test_eth_send_transaction_max_fee_less_than_tipi  sz      <9V	N$'	N 

 ]]&T
 	< ,,//
;;;	< 	< <	< 	<s0   A A=A1!A/"A1&	A=/A11A:6A=c           	      l  K   d}|j                   j                   d {   }||t        d      d|j                  dd      |j                  dd      |d}t	        j
                  t        d| d| 	      5  |j                   j                  |       d {    d d d        y 7 7 # 1 sw Y   y xY ww
NiIrj   rk   r|   r{   )rm   rn   ro   rp   r   r   chainIdz"The transaction declared chain ID z, but the connected node is on r   r_   chain_idr@   r~   r   r   r3   rr   )ra   r\   rh   wrong_chain_idactual_chain_idru   s         rW   ,test_validation_middleware_chain_id_mismatchz?AsyncEthModuleTest.test_validation_middleware_chain_id_mismatch|  s      $ ( 5 55 <9V$OOAv6$,OOAv$>% 

 ]]6~6F G,,;+<>
 	<
 ,,//
;;;	< 	< 6  <	< 	<s:   B4B$AB47B(B&B(
B4&B((B1-B4request_mockerc                   K   |j                   j                  t        dd       dd } ||dd|ii      4 d {    |j                  j	                  d	       d {   }d d d       d {    dvsJ |d
   t        |      k(  sJ |j                   j                  d       y 7 m7 L7 ># 1 d {  7  sw Y   NxY ww)Npoar   layer0xBffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeth_getBlockByNumber	extraData)mock_resultslatestproofOfAuthorityDatarR   )middleware_onioninjectr5   r_   	get_blockr   remove)ra   r\   r   
extra_datablocks        rW   test_ExtraDataToPOAMiddlewarez0AsyncEthModuleTest.test_ExtraDataToPOAMiddleware  s      	!!(()A5PQ(R)%
!0;
2KL
 	; 	; #,,00::E		; 	; %'''+,
0KKKK 	!!((/	; ;		; 	; 	; 	;sW   :CB*C B0B, B0$C/B.0;C,B0.C0C6B97C>Ckeyfile_account_pkeyc           	        K   |j                   j                  j                  |      }d|j                  |j                  t	        d      d|j                   j                  |j                  d       d {   dd}|j                  |      }|j                   j                  |j                         d {   }|t        |j                        k(  sJ y 7 `7 !wN   ypfD] r   rk   pendingr   )r   rm   rn   ro   rp   r   rq   r_   r   from_keyrQ   r@   get_transaction_countr   send_raw_transactionraw_transactionr   hash)ra   r\   r  keyfile_accountrw   signedrv   s          rW   #test_async_eth_send_raw_transactionz6AsyncEthModuleTest.test_async_eth_send_raw_transaction  s      #,,..778LM&#++!))V#<<==''  

 !11#6!::6;Q;QRR8FKK0000 Ss%   A1C3C4A C4C5 CCc                   K   |j                   j                  j                  |      }|j                  |j                  t	        d      dd}|j
                  j                  t        j                  |      dd       |j                   j                  |       d {   }t        |t              sJ |j
                  j                  d       y 7 2wNr   rk   r   signingr   r_   r   r  rQ   r@   r   r   r6   buildrr   
isinstancer   r   )ra   r\   r  r  rw   rv   s         rW   'test_async_sign_and_send_raw_middlewarez:AsyncEthModuleTest.test_async_sign_and_send_raw_middleware  s      #,,..778LM#++!))V	
 	!!((+11/BIUV 	) 	
 "66s;;(H--- 	!!((3	 <s   BCC3Casync_math_contractrH   c           
        K   |j                   j                  j                  |      }|j                   j                   d {   }|j                   j	                  |j
                         d {   }||j
                  |dz   d}|j                  |      }|j                  j                         j                          d {   }	|j                  d|	dz   g      }
||j
                  t        d      d|t        d      t        d      |
|gd	}|j                  |      }|j                   j                  |j                         d {   }|j                   j                  |       d {   }|j                   j!                  |       d {    |j                   j#                  |j
                         d {   }|j%                         d	|j
                  d
d  j'                          k(  sJ |j                   j)                  |j
                  |j*                        }|j                  j                         j                          d {   |	k(  sJ |j                  j                         j                  d       d {   }||	dz   k(  sJ t-        |d         dk(  sJ |d   d   }|d   |k(  sJ |d   |j
                  k(  sJ |d   |dz   k(  sJ t/        |d   t0              sJ t/        |d   t2              sJ t/        |d   t2              sJ |d|dz   d}|j                  |      }t5        ||j
                  |g|d
z   d      }|j                   j7                  |       d {   }|j                   j!                  |d       d {    |j                   j#                  |j
                         d {   }|t3        d      k(  sJ y 7 7 m7 7 7 y7 Y7 /7 7 j7 7 _7 4w)Nrj   r   rQ   r   incrementCounter9  r   @ r   	r   rn   ro   rp   r   r   r   dataauthorizationList0xef0100r|   rQ   rU   r   block_identifierr  r   rQ   r   yParityrs*0x0000000000000000000000000000000000000000r   rm   r  r   
   timeoutr   )r_   r   r  r   r  rQ   sign_authorization	functionscountercall
encode_abir@   r   r	  r
  rs   wait_for_transaction_receiptget_code	to_0x_hexlowercontractrU   r   r  r   r   r   rr   )ra   r\   r  r  r  r   r   authsigned_authmath_counterr  rw   r  tx_hashget_txcode	delegateddelegated_callget_auth
reset_authsigned_reset_authreset_code_txnreset_tx_hash
reset_codes                           rW   Etest_async_sign_authorization_send_raw_and_send_set_code_transactionszXAsyncEthModuleTest.test_async_sign_authorization_send_raw_and_send_set_code_transactions  s     #,,..778LM!...ll889P9PQQ  *22QY

 &88> 1::BBDIIKK"--.@<RVCVBWX!))V$'JJ"-

 !11#6 99&:P:PQQ||33G<<ll77@@@\\**?+B+BCC~~X.A.I.I!".M.S.S.U-V#WWWWLL))#++1D1H1H * 
	
 )22::<AACC|SSS(22::<AA%  B  
 
 !44446-./1444-.q1	"h...	"&9&A&AAAA EAI---(9-s333(3-222(3-222  )QY


 ,>>zJ'//&7%8
 'll;;NKKll77r7RRR#<<001H1HII
Xd^+++U /Q L  R<@C D
> LRIs   ?O9O,O9.O/AO9OBO9O!	"O9+O$,"O9O',O9;O*<BO9O-6O9O0C)O90O31$O9O5,O9O7O9O9O9!O9$O9'O9*O9-O90O93O95O97O9c                   K   ||t        d      dd}|j                  dd      dddt        d	t         ffd
}|j                  j	                  |       |j                  j                  |       d {   }|j                  j                  |       d {   }|d   k(  sJ |j                  j	                  d        y 7 M7 ,w)Nrj   rk   r   r|   r{   rL   rK   rw   rO   c                     S N rL   rw   two_gwei_in_weis     rW   gas_price_strategyzNAsyncEthModuleTest.test_GasPriceStrategyMiddleware.<locals>.gas_price_strategy3  	    ""rY   rq   )r@   r~   r?   r_   set_gas_price_strategyrr   rs   ra   r\   rh   ru   rJ  rv   rw   rI  s          @rW   test_GasPriceStrategyMiddlewarez2AsyncEthModuleTest.test_GasPriceStrategyMiddleware%  s      <9V	 

 #//!V4	#6 	# 	#S 	# 	++,>?!66zBBLL00:::/111++D1	 C:$   A0C3C4"CC+CCc                   K   ||t        d      dd}|j                  dd      dddt        d	t        ffd
}|j                  j                  |       |j                  j                  |       d {   }|j                  j                  |       d {   }|d   k(  sJ |j                  j                  d        y 7 M7 ,w)Nrj   rk   r   r|   r{   _w3rK   _txnrO   c                     t              S rF  r   rQ  rR  rI  s     rW   rJ  z[AsyncEthModuleTest.test_gas_price_strategy_middleware_hex_value.<locals>.gas_price_strategyL      ''rY   rq   r@   r~   r?   r   r_   rL  rr   rs   rM  s          @rW   ,test_gas_price_strategy_middleware_hex_valuez?AsyncEthModuleTest.test_gas_price_strategy_middleware_hex_value>  s      <9V	 

 #//!V4	(F 	(( 	(s 	( 	++,>?!66zBBLL00:::/111++D1	 C:rO  max_feer   Nwith_max_feewithout_max_feeidsc                 D  K   j                  dd      }||t        d      d|d}|t        |d|      }dddt        d	t        ffd
}j                  j                  |       j                  j                  |       d {   }j                  j                  |       d {   }j                  j                  d       d {   }	|
|d   |k(  sJ d|	d   z  |z   sJ |d   |k(  sJ |d   |d   k  sJ j                  j                  d        y 7 7 u7 Tw)Nrj   r{   rk   r   r   rL   rK   rw   rO   c                 (    j                  dd      S Nr|   r{   r~   )rL   rw   r\   s     rW   rJ  zhAsyncEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn.<locals>.gas_price_strategyl      ??1f--rY   r   r|   baseFeePerGasr   rq   	r~   r@   r   r?   r_   rL  rr   rs   r   )
ra   r\   rh   rY  max_priority_feeru   rJ  rv   rw   latest_blocks
    `        rW   9test_gas_price_from_strategy_bypassed_for_dynamic_fee_txnzLAsyncEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txnW  sL     $??1f5;9V$4 

 z>7CJ	.6 	. 	.S 	. 	++,>?!66zBBLL00::%\\33H== " 7*	
F\/225EE	
F )*.>>>>:#n"5555++D1 C:=s7   B D D"D &D'"D 	D
AD D D c                   K   ||t        d      dt        d      d}dddt        dt         ffd	}j                  j                  |       t	        j
                  t        d
      5  j                  j                  |       d {    d d d        j                  j                  d        y 7 (# 1 sw Y   'xY ww)Nrj   rk   r   r   rQ  rK   rR  rO   c                 (    j                  dd      S ra  rb  )rQ  rR  r\   s     rW   rJ  zoAsyncEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn_no_tip.<locals>.gas_price_strategy  rc  rY   r   r   r@   r?   r_   rL  r   r   r*   rr   )ra   r\   rh   ru   rJ  s    `   rW   @test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn_no_tipzSAsyncEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn_no_tip  s      <9V
O 

	.F 	.( 	.s 	. 	++,>?]]&L
 	< ,,//
;;;	<
 	++D1 <	< 	<s0   A%B>(B2B0B2$B>0B22B;7B>c                    K   |j                   j                  ||t        d      d       d {   }t        |      sJ |dkD  sJ y 7 wNrj   rm   rn   ro   r   r_   estimate_gasr@   r   )ra   r\   rh   gas_estimates       rW   test_eth_estimate_gasz(AsyncEthModuleTest.test_eth_estimate_gas  sV      &\\66?=Q
 
 ,'''a
s   ,A
AA
paramsrj   r   @0000000000000000000000000000000000000000000000000000000000000000r   balancer:  state0x1    r   rw  r:  	stateDiffc                    K   |j                   j                   d {   }d|d   i}|j                   j                  |d |j                  |i       d {    y 7 =7 wNrm   r   r_   accountsrq  rQ   ra   r\   r  rt  r  ru   s         rW   4test_eth_estimate_gas_with_override_param_type_checkzGAsyncEthModuleTest.test_eth_estimate_gas_with_override_param_type_check  sd     4 "... &4
 ll''2::FC
 	
 	
	 /	
!   AA7AAAAc                 :  K   |j                   j                  dddg       d {   }t        |d         sJ t        |d         sJ t        |d         sJ |d   dk\  sJ t        |d         sJ t	        |d         dkD  rt        |d   d         sJ y y 7 tw	Nrj   r   2   rd  gasUsedRatiooldestBlockr   rewardr_   fee_historyr   r   r   ra   r\   r  s      rW   test_eth_fee_historyz'AsyncEthModuleTest.test_eth_fee_history  s     $LL44Q2$GGK8999K7888+m4555=)Q...K1222{8$%)H 5a 8999 * Hs   "BBA5Basync_empty_blockc                 @  K   |j                   j                  d|d   dg       d {   }t        |d         sJ t        |d         sJ t        |d         sJ |d   dk\  sJ t        |d         sJ t	        |d         dkD  rt        |d   d         sJ y y 7 tw	Nrj   numberr  rd  r  r  r   r  r  )ra   r\   r  r  s       rW   !test_eth_fee_history_with_integerz4AsyncEthModuleTest.test_eth_fee_history_with_integer  s      %LL44 *RD
 
 K8999K7888+m4555=)Q...K1222{8$%)H 5a 8999 *
s   %BBA5Bc                    K   |j                   j                  dd       d {   }t        |d         sJ t        |d         sJ t        |d         sJ |d   dk\  sJ y 7 ?wNrj   r   rd  r  r  r   r_   r  r   r   r  s      rW   *test_eth_fee_history_no_reward_percentilesz=AsyncEthModuleTest.test_eth_fee_history_no_reward_percentiles  ss      %LL44QAAK8999K7888+m4555=)Q...	 Bs    A$A"A A$c                 f   K   |j                   j                   d {   }t        |      sJ y 7 wrF  r_   rf  r   )ra   r\   rf  s      rW   test_eth_max_priority_feez,AsyncEthModuleTest.test_eth_max_priority_fee  s-     !)!>!>>*+++ ?s   1/1c                   K    ||t        d      i it        d      ddggii      4 d {    t        j                  t        d      5  |j                  j
                   d {   }t        |      sJ |t        k(  sJ 	 d d d        d d d       d {    y 7 p7 8# 1 sw Y   xY w7 # 1 d {  7  sw Y   y xY wwNeth_maxPriorityFeePerGaseth_feeHistoryr  r   )mock_errorsr   z^There was an issue with the method eth_maxPriorityFeePerGas. Calculating using eth_feeHistory.r   r;   r   warnsUserWarningr_   rf  r   r   )ra   r\   r   priority_fees       rW   6test_eth_max_priority_fee_with_fee_history_calculationzIAsyncEthModuleTest.test_eth_max_priority_fee_with_fee_history_calculation  s      "$%?@"E%&67(aSE9JK
 	8 	8
 8 	8 &.\\%B%BB!,///#'7777	8	8 	8 	8  C	8 	8	8 	8 	8 	8sn   *CBCB/B!&B'B!B/CB-CB!!B*	&B/-C/C5B86C=Cc                 v   K   |j                   j                  |d          d {   }|d   |d   k(  sJ y 7 wNr  r_   r   ra   r\   r  r   s       rW   test_eth_getBlockByHashz*AsyncEthModuleTest.test_eth_getBlockByHash  sC      ll,,->v-FGGV} 1& 9999 H   "979c                    K   t        j                  t              5  |j                  j	                  t
               d {    d d d        y 7 # 1 sw Y   y xY wwrF  r   r   r%   r_   r   UNKNOWN_HASHra   r\   s     rW   !test_eth_getBlockByHash_not_foundz4AsyncEthModuleTest.test_eth_getBlockByHash_not_found  sI      ]]=) 	7,,((666	7 	76	7 	7-   A#AA A	AAAAc                 d   K   |j                   j                  d       d {   }|d   J y 7 wNr  r  r  )ra   r\   r   s      rW   test_eth_getBlockByHash_pendingz2AsyncEthModuleTest.test_eth_getBlockByHash_pending  s2     ll,,Y77V}$$$ 8   0.0c                 v   K   |j                   j                  |d          d {   }|d   |d   k(  sJ y 7 wNr  r  r  s       rW   &test_eth_getBlockByNumber_with_integerz9AsyncEthModuleTest.test_eth_getBlockByNumber_with_integer  sC      ll,,->x-HIIX"3H"==== Jr  c                 d   K   |j                   j                  d       d {   }|d   J y 7 wNr   r  r  r  s       rW    test_eth_getBlockByNumber_latestz3AsyncEthModuleTest.test_eth_getBlockByNumber_latest"  s4      ll,,X66V}((( 7r  c                    K   t        j                  t              5  |j                  j	                  t        d             d {    d d d        y 7 # 1 sw Y   y xY wwN90  r   r   r%   r_   r   r   )ra   r\   r  s      rW   #test_eth_getBlockByNumber_not_foundz6AsyncEthModuleTest.test_eth_getBlockByNumber_not_found)  sN      ]]=) 	=,,((U);<<<	= 	=<	= 	=s.   A (AAA		A AAA c                 d   K   |j                   j                  d       d {   }|d   J y 7 wr  r  r  s       rW   !test_eth_getBlockByNumber_pendingz4AsyncEthModuleTest.test_eth_getBlockByNumber_pending0  s4      ll,,Y77V}$$$ 8r  c                    K   |j                   j                  t        d             d {   }|j                   j                  d       d {   }|d   dk(  sJ |d   |d   k(  sJ y 7 ?7 wNr   earliestr  r  r_   r   r   )ra   r\   r  genesis_blockr   s        rW   "test_eth_getBlockByNumber_earliestz5AsyncEthModuleTest.test_eth_getBlockByNumber_earliest7  sm      'll44[^DDll,,Z88X!###V}f 5555 E8s!   (A.A*"A.A,A.,A.c                    K   |j                   j                  d       d {   }|J t        |d   t              sJ y 7 wNsafer  r_   r   r  r   r  s       rW   test_eth_getBlockByNumber_safez1AsyncEthModuleTest.test_eth_getBlockByNumber_safe@  sD      ll,,V44   %/3/// 5   AA Ac                    K   |j                   j                  d       d {   }|J t        |d   t              sJ y 7 wN	finalizedr  r  r  s       rW   #test_eth_getBlockByNumber_finalizedz6AsyncEthModuleTest.test_eth_getBlockByNumber_finalizedH  sD      ll,,[99   %/3/// :r  c                    K   |j                   j                  |d          d {   }t        |t              sJ y 7 wr  r_   get_block_receiptsr  listra   r\   r  receiptss       rW   test_eth_getBlockReceipts_hashz1AsyncEthModuleTest.test_eth_getBlockReceipts_hashP  s;      "889J69RSS(D))) T   "><>c                    K   t        j                  t              5  |j                  j	                  t
               d {    d d d        y 7 # 1 sw Y   y xY wwrF  r   r   r%   r_   r  r  r  s     rW   #test_eth_getBlockReceipts_not_foundz6AsyncEthModuleTest.test_eth_getBlockReceipts_not_foundW  sN      ]]=) 	@,,11,???	@ 	@?	@ 	@r  c                    K   |j                   j                  |d          d {   }t        |t              sJ y 7 wr  r  r  s       rW   &test_eth_getBlockReceipts_with_integerz9AsyncEthModuleTest.test_eth_getBlockReceipts_with_integer^  s;      "889J89TUU(D))) Vr  c                 z   K   |j                   j                  d       d {   }t        |t              sJ y 7 wNr  r  r  s       rW   test_eth_getBlockReceipts_safez1AsyncEthModuleTest.test_eth_getBlockReceipts_safee  s5      "88@@(D))) A   ;9;c                 z   K   |j                   j                  d       d {   }t        |t              sJ y 7 wNr  r  r  s       rW   #test_eth_getBlockReceipts_finalizedz6AsyncEthModuleTest.test_eth_getBlockReceipts_finalizedl  s5      "88EE(D))) Fr  async_block_with_txnc                    K   |j                   j                  |d   d       d {   }t        t        |d   d         }|d   |d   d   k(  sJ y 7 +wNr  Ttransactionsr   r  r_   r   r
   r>   )ra   r\   r  r   transactions        rW   .test_eth_get_block_by_number_full_transactionszAAsyncEthModuleTest.test_eth_get_block_by_number_full_transactionss  sa      ll,,-A(-KTRR65#8#;<6"&:>&J1&MMMM Ss   #AA,Amined_txn_hashc                 p   K   |j                   j                  |       d {   }t        |      sJ y 7 wrF  r_   get_raw_transactionr   )ra   r\   r  r
  s       rW   test_eth_get_raw_transactionz/AsyncEthModuleTest.test_eth_get_raw_transaction{  s3      !) @ @ PP((( Qs   646c                    K   t        j                  t        dt         d      5  |j                  j                  t               d {    d d d        y 7 # 1 sw Y   y xY wwNzTransaction with hash: ''r   r   r   r0   r  r_   r  r  s     rW   )test_eth_get_raw_transaction_raises_errorz<AsyncEthModuleTest.test_eth_get_raw_transaction_raises_error  sb      ]])A,q'Q
 	A ,,22<@@@	A 	A A	A 	As.   $A%#A	A
A	A%AA"A%c                   K   j                   j                  ||t        d      d       d {    dt        ffd}t	        j
                   |       d       d {   }t        |      sJ |d   }j                   j                  |d       d {   }t        |      sJ |d	   }j                   j                  |d       d {   }t        |      sJ y 7 7 7 L7 w)
Nrj   ro  rO   c                     K   	 	  j                   j                  dd       d {   S 7 # t        $ r! t        j                  d       d {  7   Y Qw xY ww)Nr   r   g?)r_   get_raw_transaction_by_blockr0   asynciosleep)r\   s   rW   wait_for_block_with_txnzYAsyncEthModuleTest.test_eth_get_raw_transaction_by_block.<locals>.wait_for_block_with_txn  sP     !)!J!J8UV!WWWW* !--,,,s=   A, *, A, !AAAAAA   r)  r  r   r  )r_   rr   r@   r   r  wait_forr   r  )	ra   r\   r  rh   r  raw_txnasync_block_with_txn_numberr
  async_block_with_txn_hashs	    `       rW   %test_eth_get_raw_transaction_by_blockz8AsyncEthModuleTest.test_eth_get_raw_transaction_by_block  s      ll++?=Q
 	
 	
	x 	  (()@)BANN    ';8&D# ( I I'!
 
 ((( %9$@! ( I I%q!
 
 (((?	
  O


sE   ,C&C/C&C  5C&C"5C&C$C& C&"C&$C&unknown_block_num_or_hash   _+c}c                    K   t        j                  t        dt        |      d      5  |j                  j                  |d       d {    d d d        y 7 # 1 sw Y   y xY wwNz"Transaction index: 0 on block id: z not found.r   r   r   r   r0   r   r_   r  )ra   r\   r  s      rW   2test_eth_get_raw_transaction_by_block_raises_errorzEAsyncEthModuleTest.test_eth_get_raw_transaction_by_block_raises_error  ss      ]]4$%>?B C
 
	 ,,;;)1  
	 
	
	 
	s.   )A' AAA	A'AA$ A'c                    K   d}t        j                  t        d|       5  |j                  j	                  |d       d {    d d d        y 7 # 1 sw Y   y xY wwNunknownz=Value did not match any of the recognized block identifiers: r   r   r   r   r4   r_   r  )ra   r\   unknown_identifiers      rW   Ctest_eth_get_raw_transaction_by_block_raises_error_block_identifierzVAsyncEthModuleTest.test_eth_get_raw_transaction_by_block_raises_error_block_identifier  sn      ']]O%&(
 	S ,,;;<NPQRRR	S 	S S	S 	Ss.   !A AAA	AAAAc                   K   |j                   j                   d {   }|d   }t        j                  t              5  |j                   j                  t        t        t        |j                                                  d {    d d d        |j                   j                  |       d {   }t        |      sJ |dk\  sJ y 7 7 F# 1 sw Y   ExY w7 )wr^   r_   r  r   r   r)   get_balancer   r   r   r3  r   )ra   r\   r  r   rw  s        rW   test_eth_get_balancez'AsyncEthModuleTest.test_eth_get_balance  s     !...1+]]>* 	,,**
6'--/+B CD  	
 !0099'"""!|| /	 	
 :sE   CC"CACCC&C2C3CCCCasync_math_contract_addressc                    K   |j                   j                  |       d {   }t        |t              sJ t	        |      dkD  sJ y 7 'wr^   r_   r1  r  r   r   )ra   r\   r  r:  s       rW   test_eth_get_codez$AsyncEthModuleTest.test_eth_get_code  sF      \\**+FGG$)))4y1}} Hs   AA	(Ac                   K   t        j                  t              5  |j                  j	                  t        t        t        |j                  j                                                  d {    d d d        y 7 # 1 sw Y   y xY wwrF  
r   r   r)   r_   r1  r   r   r   rQ   r3  )ra   r\   r  s      rW   !test_eth_get_code_invalid_addressz4AsyncEthModuleTest.test_eth_get_code_invalid_address  sq      ]]>* 	,,''
62E2M2M2S2S2U+V WX  	 		 	s/   B
AA>.A</A>3	B
<A>>BB
async_emitter_contractc                    K   |j                   j                   d {   }|j                   j                  |j                  |       d {   }t	        |t
              sJ t        |      dkD  sJ y 7 U7 )wr^   )r_   block_numberr1  rQ   r  r   r   )ra   r\   r  block_idr:  s        rW   'test_eth_get_code_with_block_identifierz:AsyncEthModuleTest.test_eth_get_code_with_block_identifier  sc      "222\\**+A+I+I8TT$)))4y1}} 3Ts!   A6A2-A6
A4(A64A6c                   K   |j                   j                  d      j                  d|i       d {   }|j                  j	                  |       d {   }t        |      sJ |d   }t        |      dkD  sJ |d   d   J t        |d   d         sJ t        |d   d   d         dk(  sJ t        |d         dk\  sJ |d   |d<   |d   |d	<   |j                  j                  |       d {    y 7 7 7 	w
Nrj   rm   
accessListr   rQ   storageKeysB   gasUsedrp   
r,  r  build_transactionr_   create_access_listr   r   r   r   rr   )ra   r\   rh   r  rw   responseaccess_lists          rW   test_eth_create_access_listz.AsyncEthModuleTest.test_eth_create_access_list  s*     (11BB1EWW<=
 

 "88==x   |,;!###1~i(444";q>)#<===;q>-034:::8I&'1,,, %\2Li(E
 ll++C000)

 > 	1s4   0C?C9"C?C;BC?3C=4C?;C?=C?c                 ~   K   |j                   j                  |       d {   }t        |      sJ |dk\  sJ y 7 wr^   r_   r  r   )ra   r\   rh   transaction_counts       rW   test_eth_get_transaction_countz1AsyncEthModuleTest.test_eth_get_transaction_count  sI      #+,,"D"D3#
 
 +,,, A%%%	
s   =;=c                 H  K   |j                   j                   d {   }|d   }|j                  dd||j                  d      }|j                   j	                  |       d {   }t        |      sJ |j                  j                  dg|      \  }|dk(  sJ y 7 7 :w)Nr   add      rm   rn   abi_element_identifierfn_argsr  uint256   r_   r  _prepare_transactionrQ   r.  r   codecdecode)ra   r\   r  r  r   ru   call_resultr   s           rW   test_eth_callz AsyncEthModuleTest.test_eth_call+  s      "...1+(==#(!(0C0K0KL > 


 %LL--j99%%%NN))9+{C	|| / :s"   B"BAB"%B &9B" B"async_revert_contractc           	        K   |j                   j                   d {   }|d   }|j                  d||j                  d      }|j                   j	                  |       d {   }|j
                  j                  dg|      \  }|du sJ t        d      }|j                   j	                  |d|j                  d	|ii       d {   }|j
                  j                  dg|      \  }|d
u sJ |j                   j	                  |d|j                  d	t        |      ii       d {   }	|j
                  j                  dg|	      \  }
|
d
u sJ y 7 87 7 7 1w)Nr   normalFunctionr3  r5  r  boolTF  0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063185c38a4146041578063c06a97cb146049578063d67e4b84146051575b600080fd5b60476071565b005b604f60df565b005b605760e4565b604051808215151515815260200191505060405180910390f35b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f46756e6374696f6e20686173206265656e2072657665727465642e000000000081525060200191505060405180910390fd5b600080fd5b60008090509056fea2646970667358221220bb71e9e9a2e271cd0fbe833524a3ea67df95f25ea13aef5b0a761fa52b538f1064736f6c63430006010033r   r:  FrR   )	r_   r  r:  rQ   r.  r;  r<  r   r   )ra   r\   r?  r  r   ru   r=  r   override_codebytes_call_resultbytes_results              rW    test_eth_call_with_override_codez3AsyncEthModuleTest.test_eth_call_with_override_code<  st     "...1+*??#3!(0E0M0MN @ 

 %LL--j99NN))6(K@	~~  U	
 %LL--"**V],CD
 

 NN))6(K@	 #+,,"3"3"**VX]5S,TU#
 

 #..//:KLu$$$= / :

sH   EEAE$E%A"EEA!E)E*+EEEEc                    K   |j                   j                   d {   }d|d   i}|j                   j                  |d|j                  |i       d {    y 7 =7 w)Nrm   r   r   )r_   r  r.  rQ   r  s         rW   ,test_eth_call_with_override_param_type_checkz?AsyncEthModuleTest.test_eth_call_with_override_param_type_checkb  sd     4 "... &4
 ll#6#>#>"G
 	
 	
	 /	
r  c                 D  K   |j                   j                   d {   }|j                  dd|d   |j                  d      }|j                   j	                  |       d {   }t        |      sJ |j                  j                  dg|      \  }|dk(  sJ y 7 7 :wNr/  )r   r   r   r3  r4  r7  r9  )ra   r\   r  r  ru   r=  r   s          rW   test_eth_call_with_0_resultz.AsyncEthModuleTest.test_eth_call_with_0_result  s      "...(==#(!)!4G4O4OP > 


 %LL--j99%%%NN))9+{C	{{ / :s"   B BAB #B$9B B c                    K   |j                  d||j                  d      }t        j                  t        d      5  |j
                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY ww)NrevertWithMessager3  rB  .execution reverted: Function has been revertedr   )r:  rQ   r   r   r'   r_   r.  ra   r\   r?  r   ru   s        rW   test_eth_call_revert_with_msgz0AsyncEthModuleTest.test_eth_call_revert_with_msg  s      +??#65+33 @ 

 ]]&V
 	0 ,,##J///	0 	0 0	0 	0s.   <A9A-A+A-"	A9+A--A62A9c                    K   t        j                  t        d      5  |j                  d||j                  d      }|j
                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY wwNzexecution revertedr   revertWithoutMessager3  rB  r   r   r'   r:  rQ   r_   r.  rQ  s        rW    test_eth_call_revert_without_msgz3AsyncEthModuleTest.test_eth_call_revert_without_msg  s{      ]]-5IJ 	0.CC'=9/77 D J ,,##J///	0 	0 0	0 	0s.   A9?A-A+A-"	A9+A--A62A9c                   K   |j                  ddg      }|j                  d||j                  d      }t        j                  t
        |      5  |j                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY wwNUnauthorizedWithMessagezYou are not authorized)r5  argscustomErrorWithMessager3  rB  r   r/  r:  rQ   r   r   r&   r_   r.  ra   r\   r?  r   r  ru   s         rW   *test_eth_call_revert_custom_error_with_msgz=AsyncEthModuleTest.test_eth_call_revert_custom_error_with_msg  s      %//#<*+ 0 
 +??#;5+33 @ 

 ]].d; 	0,,##J///	0 	0/	0 	0s0   ABB1A?2B6	B?BB
Bc                   K   |j                  d      }|j                  d||j                  d      }t        j                  t
        |      5  |j                  j                  |       d {    d d d        y 7 # 1 sw Y   y xY wwNUnauthorized)r5  customErrorWithoutMessager3  rB  r   r]  r^  s         rW   -test_eth_call_revert_custom_error_without_msgz@AsyncEthModuleTest.test_eth_call_revert_custom_error_without_msg  s      %//~/V*??#>5+33 @ 

 ]].d; 	0,,##J///	0 	0/	0 	0s0   ABA?/A=0A?4	B=A??BBpanic_error,params011112r   212231324151async_panic_errors_contractpanic_errorc                   K   t        |j                  d|       }t        |   }t        j                  t
        t        j                  |            5   || j                          d {    d d d        y 7 # 1 sw Y   y xY wwN	errorCoder   	getattrr,  r   r   r   r(   reescaper.  )ra   r\   rp  rq  rt  method	error_msgs          rW   test_contract_panic_errorsz-AsyncEthModuleTest.test_contract_panic_errors  s|     , '11}%
 &k2	]]-RYYy5IJ 	)&/&&(((	) 	)(	) 	)s0   ABA:*A8+A:/	B8A::B?Basync_offchain_lookup_contractmonkeypatchrG   c                   K   t        |j                        j                         }t        |d| dt         dt
               |j                         j                  t               d {   }|j                  j                  t              j                          d {   }|j                  j                  dg|      d   dk(  sJ |j                  j                  dg|      d   dk(  sJ y 7 7 QwNhttps://web3.py/gateway//.jsonmocked_request_urlmocked_json_datastringr   web3py)r$   rQ   r3  r!   OFFCHAIN_LOOKUP_TEST_DATAWEB3PY_AS_HEXBYTEScallertestOffchainLookupr,  r.  r;  r<  )ra   r\   r|  r   r}  normalized_contract_addressresponse_callerresponse_function_calls           rW   test_eth_call_offchain_lookupz0AsyncEthModuleTest.test_eth_call_offchain_lookup  s      '6*22'

%' 	$ 	4!9:U9VVWXqWrrwx/	

 !? E E G Z Z%!
 
 (F'O'O'b'b%(

$&" ~~$$hZA!DPPP~~$$hZ1GHKxWWW
"s%   A'C2)C.*4C2C0AC20C2c                 |  K   t         t        ||      z   t        z   }t        j                  t
              5 }|j                  d      j                  t               d {    d d d        j                  j                  |k(  sJ t        j                  t
              5 }|j                  j                  t              j                  d       d {    d d d        j                  j                  |k(  sJ d|j                  _        t        j                  t
              5 }|j                  j                  t              j                          d {    d d d        j                  j                  |k(  sJ d|j                  _        y 7 1# 1 sw Y   1xY w7 # 1 sw Y   xY w7 W# 1 sw Y   VxY wwNFccip_read_enabledT)OFFCHAIN_LOOKUP_4BYTE_DATArX   OFFCHAIN_LOOKUP_RETURN_DATAr   r   r-   r  r  r  ro   r  r,  r.  providerglobal_ccip_read_enabled)ra   r\   r|  return_dataeexcinfoexc_infos          rW   ?test_eth_call_offchain_lookup_raises_when_ccip_read_is_disabledzRAsyncEthModuleTest.test_eth_call_offchain_lookup_raises_when_ccip_read_is_disabled  s     ':8 *	* 	 ]]>* 	<a077"' 8   !:;< <	< ww||{*** ]]>* 	,g0::MM)dUd+, ,	, }}!![000 6;2]]>* 	h0::MM)df 	 ~~""k111592+<	< 	<,	, 	,	 	s   4F<)FF F$<F< 3F"F F"AF<%1F0F.F05F<FFF< F""F+'F<.F00F95F<c                   K   t        |j                        j                         }t        |d| dt         dt
               d|j                  _        |j                  j                  t              j                  d       d {   }|j                  j                  dg|      d	   d
k(  sJ d|j                  _        y 7 ;wNr  r  r  r  FTr  r  r   r  )r$   rQ   r3  r!   r  r  r  r  r,  r  r.  r;  r<  )ra   r\   r|  r   r}  r  r'  s          rW   ?test_eth_call_offchain_lookup_call_flag_overrides_provider_flagzRAsyncEthModuleTest.test_eth_call_offchain_lookup_call_flag_overrides_provider_flag=  s      '6*22'

%' 	$ 	4!9:U9VVWXqWrrwx/	
 6;27AATT%

$$
&' ~~$$hZ:1=III592's   BCC<Cmax_redirects   c                 6  K   |j                   j                  }||j                   _        t        j                  t        d      5  |j                         j                  t               d {    d d d        ||j                   _        y 7 # 1 sw Y   xY wwNz
at least 4r   )r  ccip_read_max_redirectsr   r   r4   r  r  r  )ra   r\   r|  r  default_max_redirectss        rW   Dtest_eth_call_offchain_lookup_raises_if_max_redirects_is_less_than_4zWAsyncEthModuleTest.test_eth_call_offchain_lookup_raises_if_max_redirects_is_less_than_4X  s      !) 1 1 I I4A1]]>> 	0779LL)  	
 5J1		 	s0   AB'B,B-B1BBBBc                 H  K   t        |j                        j                         }t        |d| dt         dt
        d       t        j                  t        d      5  |j                         j                  t               d {    d d d        y 7 # 1 sw Y   y xY wwNr  r  r  not_data)r  r  json_data_fieldzmissing 'data' fieldr   )r$   rQ   r3  r!   r  r  r   r   r3   r  r  ra   r\   r|  r   r}  r  s         rW   Stest_eth_call_offchain_lookup_raises_for_improperly_formatted_rest_request_responsezfAsyncEthModuleTest.test_eth_call_offchain_lookup_raises_for_improperly_formatted_rest_request_responsej  s      '6*22'

%' 	$ 	4!9:U9VVWXqWrrwx/&		
 ]].6LM 	0779LL)  	 		 	s0   AB"'BBB	B"BBB"status_code_non_4xx_errord   i,  i  iX  c           	      f  K   t        |j                        j                         }t        |d| dt         d|t
               t        |dddt
        |t               |j                         j                  t               d {   }|j                  j                  d	g|      d
   dk(  sJ y 7 *wNr  r  r  r  mocked_status_coder  POSTzhttps://web3.py/gateway   )http_methodr  r  r  sendercalldatar  r   r  )
r$   rQ   r3  r!   r  r  r  r  r;  r<  )ra   r\   r|  r   r}  r  r  r'  s           rW   Ttest_eth_call_offchain_lookup_tries_next_url_for_non_4xx_error_status_and_tests_POSTzgAsyncEthModuleTest.test_eth_call_offchain_lookup_tries_next_url_for_non_4xx_error_status_and_tests_POST  s      '6*22'

%' 	$ 	4!9:U9VVWXqWrrwx8/		
 	48"/..	
 8>>@SS%
 
 ~~$$hZ:1=III
s   BB1B/+B1c                 \  K   t        |j                        j                         }t        |d| dt         dt        dd      t               t        j                  t        d      5  |j                         j                  t               d {    d d d        y 7 # 1 sw Y   y xY ww	Nr  r  r  i  i  r  zcalled raise_for_status\(\)r   )r$   rQ   r3  r!   r  r   r  r   r   	Exceptionr  r  r  s         rW   Htest_eth_call_offchain_lookup_calls_raise_for_status_for_4xx_status_codez[AsyncEthModuleTest.test_eth_call_offchain_lookup_calls_raise_for_status_for_4xx_status_code  s      '6*22'

%' 	$ 	4!9:U9VVWXqWrrwx&sC0/		
 ]]9,KL 	0779LL)  	 		 	s0   A'B,)'B BB 	B,B  B)%B,c                    K   t        j                  t        d      5  |j                         j	                  t
               d {    d d d        y 7 # 1 sw Y   y xY wwNz(Offchain lookup failed for supplied urlsr   )r   r   r+   r  r  r  )ra   r|  s     rW   @test_eth_call_offchain_lookup_raises_when_all_supplied_urls_failzSAsyncEthModuleTest.test_eth_call_offchain_lookup_raises_when_all_supplied_urls_fail  s_      ]]"*T
 	 1779LL)  	 		 	s.   A!'AAA
	A!AAA!c                 $  K   t        |j                        j                         }t        |d| d       t	        j
                  t        d      5  |j                         j                          d {    d d d        y 7 # 1 sw Y   y xY wwNr  z/0x.json)r  zToo many CCIP read redirectsr   )	r$   rQ   r3  r!   r   r   r/   r  continuousOffchainLookup)ra   r|  r}  r  s       rW   Ftest_eth_call_continuous_offchain_lookup_raises_with_too_many_requestszYAsyncEthModuleTest.test_eth_call_continuous_offchain_lookup_raises_with_too_many_requests  s      '6*22'

%' 	$ 	4!9:U9VV^_	
 ]]?2PQ 	U0779RRTTT	U 	UT	U 	Us0   AB"B4B5B9	BBB	Bc           
        K   |j                   j                  dt        d      iddt        d      iiddt        d      t        d      dgdgddd	d
       d {   }t        |      dk(  sJ |d   }|j	                  d      dk(  sJ |j	                  d      }|J t        |      dk(  sJ |d   t        fddD              sJ d   dk(  sJ d   t        dd      k(  sJ y 7 w)Nrd  r(  *0xc100000000000000000000000000000000000000rw   erm   rn   r   r   blockOverridesstateOverridescallsTblockStateCalls
validationtraceTransfersr   rj   r   r  c              3   &   K   | ]  }|v  
 y wrF  rG  .0key
call_entrys     rW   	<genexpr>z:AsyncEthModuleTest.test_eth_simulate_v1.<locals>.<genexpr>        
"%C:
   
returnDatalogsr#  statusr  r#  0x5208r   r_   simulate_v1r@   r   getallr   )ra   r\   simulate_resultr   calls_resultr  s        @rW   test_eth_simulate_v1z'AsyncEthModuleTest.test_eth_simulate_v1  sG     ( 8 8
 ,SW+ I )3y>K+ )U&R03B8;B	"$( #"&-0 3!
 
8 ?#q((( #zz/*b000zz'*'''< A%%%!!_
 
)T
 
 	
 
 (#q((()$Hb(9999U
s   AC-C+BC-c                 Z   K   |j                   j                   d {   }|dk(  sJ y 7 wNr  r_   r   )ra   r\   r   s      rW   test_async_eth_chain_idz*AsyncEthModuleTest.test_async_eth_chain_id  s+     !...?*** /rc   c                 h  K   |j                   j                  |       d {   }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         sJ |d	   J t	        |d	         sJ |d
   }t        |t              sJ |dkD  sJ y 7 wNblockNumberr  	blockHashr  transactionIndexr   transactionHashrn   rm   effectiveGasPricer_   get_transaction_receiptr   r   r   r  r   ra   r\   r  r  receipteffective_gas_prices         rW   ,test_async_eth_get_transaction_receipt_minedz?AsyncEthModuleTest.test_async_eth_get_transaction_receipt_mined  s      !<<^LLw}%)=h)GGGG{#';F'CCCC)*a///()Xn-EEEE"74=111v***"76?333%&9:-s333"Q&&& M   B2B0BB2c                 \  K   |j                   j                  ||t        d      d|j                  dd      |j                  dd      d       d {   }t	        j
                  t              5  |j                   j                  |       d {    d d d        y 7 J7 # 1 sw Y   y xY wwNrj   rk   r   r{   r   r_   rr   r@   r~   r   r   r0   r  )ra   r\   rh   rv   s       rW   .test_async_eth_get_transaction_receipt_unminedzAAsyncEthModuleTest.test_async_eth_get_transaction_receipt_unmined&  s      "66?=Q (6 :(06(B	
 	
 ]]./ 	A,,66x@@@	A 	A	
 A	A 	As<   AB,BB,/B BB 
B,B  B)%B,async_block_with_txn_with_logtxn_hash_with_logc                   K   |j                   j                  |       d {   }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         d	k(  sJ |d   d   }|d   |d   k(  sJ |d   |d   k(  sJ |d
   dk(  sJ t        |d   |j                        sJ |d   dk(  sJ |d   t        |      k(  sJ y 7 wNr  r  r  r  r  r   r  r  rj   logIndexrQ   r_   r0  r   r   r   r   rQ   ra   r\   r  r  r  r  	log_entrys          rW   5test_async_eth_get_transaction_receipt_with_log_entryzHAsyncEthModuleTest.test_async_eth_get_transaction_receipt_with_log_entry9  H     !AABSTTw}%)Fx)PPPP{#'DV'LLLL)*a///()X6G-HHHH76?#q(((FOA&	'+H+RRRR%)Fv)NNNN$)))y35K5S5STTT+,111*+x8I/JJJJ U   C$C"CC$c                 h  K   |j                   j                  |       d {   }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         sJ |d	   J t	        |d	         sJ |d
   }t        |t              sJ |dkD  sJ y 7 wr  r_   r0  r   r   r   r  r   r  s         rW   1test_async_eth_wait_for_transaction_receipt_minedzDAsyncEthModuleTest.test_async_eth_wait_for_transaction_receipt_minedR  s      !AA.QQw}%)=h)GGGG{#';F'CCCC)*a///()Xn-EEEE"74=111v***"76?333%&9:-s333"Q&&& Rr  z+latest geth seems to cause this to be flakyF)reasonstrictc                   K   |j                   j                  ||t        d      d|j                  dd      |j                  dd      d       d {   }d}t	        j
                  t              5 |j                   j                  ||       d {    d d d        fdt        |      |fD        sJ y 7 f7 '# 1 sw Y   &xY ww)	Nrj   rk   r   r{   r   {Gz?r)  c              3   8   K   | ]  }|t              v   y wrF  r   r  _r  s     rW   r  zYAsyncEthModuleTest.test_async_eth_wait_for_transaction_receipt_unmined.<locals>.<genexpr>       FqS]"F   	r_   rr   r@   r~   r   r   r.   r0  repr)ra   r\   rh   rv   r*  r  s        @rW   3test_async_eth_wait_for_transaction_receipt_unminedzFAsyncEthModuleTest.test_async_eth_wait_for_transaction_receipt_unminedg  s      "66?=Q (6 :(06(B	
 	
 ]]=) 	WX,,;;Hg;VVV	W GT(^W,EFFF	
 W	W 	Ws<   AC	B9C	2!B=B;B="C	;B==CC	c                   K   |j                   j                  |       d {   }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         d	k(  sJ |d   d   }|d   |d   k(  sJ |d   |d   k(  sJ |d
   dk(  sJ t        |d   |j                        sJ |d   dk(  sJ |d   t        |      k(  sJ y 7 wr  r   r  s          rW   :test_async_eth_wait_for_transaction_receipt_with_log_entryzMAsyncEthModuleTest.test_async_eth_wait_for_transaction_receipt_with_log_entry  r  r  c                    K   |j                   j                   d {   }t        |      sJ t        |      dk7  sJ t	        d |D              sJ y 7 6w)Nr   c              3   2   K   | ]  }t        |        y wrF  r   r  r   s     rW   r  z=AsyncEthModuleTest.test_async_eth_accounts.<locals>.<genexpr>       HG&w/H   r_   r  r   r   r  ra   r\   r  s      rW   test_async_eth_accountsz*AsyncEthModuleTest.test_async_eth_accounts  sQ     !...H%%%8}!!!HxHHHH /s   AA7Ac                 t   K   |j                   j                   d {   }t        |      sJ |dk\  sJ y 7 wr^   r_   blob_base_feer   )ra   r\   r#  s      rW   test_async_eth_blob_base_feez/AsyncEthModuleTest.test_async_eth_blob_base_fee  s9     &ll888-(((!!! 9s   868c                   K   t        d      t        |d   dz
        d}|j                  j                  |       d {   }t        |      dk(  sJ |d   t        |d   dz
        d}t	        j
                  t              5  |j                  j                  |       d {   }d d d        t        d      t        d}|j                  j                  |       d {   }t        |      dk(  sJ t        d      t        t        gd}|j                  j                  |       d {   }t        |      dk(  sJ y 7 7 # 1 sw Y   xY w7 q7 (wNr   r  rj   	fromBlocktoBlockr(  rQ   r   r_   get_logsr   r   r   r2   UNKNOWN_ADDRESS)ra   r\   r  filter_paramsr   s        rW   $test_async_eth_get_logs_without_logsz7AsyncEthModuleTest.test_async_eth_get_logs_without_logs  sO     %Q"#@#JQ#NO'
  ||,,];;6{a 7x@"#@#JQ#NO
 ]]<( 	@#<<00??F	@ %Q&
  ||,,];;6{a %Q'9
  ||,,];;6{a; < @	@ 	@ < <sY   <EE AEE"E#E'8EE A
E*E+EEE
EEasync_emitter_contract_addressc                   K   |d   |d   d}|j                   j                  |       d {   }t        ||||       dt        d      i}|j                   j                  |       d {   }t        ||||       t        d      |d}|j                   j                  |       d {   }t        ||||       y 7 7 T7 wNr  r'  r(  r   r*  r_   r,  r    r   ra   r\   r  r0  r  r.  r   s          rW   !test_async_eth_get_logs_with_logsz4AsyncEthModuleTest.test_async_eth_get_logs_with_logs  s      7x@4X>'
  ||,,];;)*		
 Q
  ||,,];;)*		
 %Q5
  ||,,];;)*		
9 < < <s3   *CB==C*B?+>C)C*C?CCc                 <  K   t        d      d t        d      gd}|j                  j                  |       d {   }t	        ||||       t        d      t        d      d gd}|j                  j                  |       d {   }t	        ||||       y 7 ]7 wNr   B0x000000000000000000000000000000000000000000000000000000000000d431r(  topicsB0x057bc32826fbe161da1c110afcdcae7c109a8b69149f727fc37a603c60ef94car   r   r_   r,  r    r4  s          rW   ,test_async_eth_get_logs_with_logs_topic_argsz?AsyncEthModuleTest.test_async_eth_get_logs_with_logs_topic_args  s      %QX'
  ||,,];;)*		
 %QX 	
  ||,,];;)*		
' <$ <s"   8BBA	BBBBc                    K   t        d      g dd}|j                  j                  |       d {   }t        |      dk(  sJ y 7 w)Nr   )NNNNr9  r   r_   r,  r   )ra   r\   r.  r   s       rW   1test_async_eth_get_logs_with_logs_none_topic_argszDAsyncEthModuleTest.test_async_eth_get_logs_with_logs_none_topic_args1  sI      %Q.'
  ||,,];;6{a <s   /A	AA	c                 \  K   |j                   j                   d {   }t        |      st        |      sJ t        |      r|du sJ y t        |      rSt	        t
        |      }d|v sJ d|v sJ d|v sJ t        |d         sJ t        |d         sJ t        |d         sJ y y 7 wNFstartingBlockcurrentBlockhighestBlockr_   syncingr   r   r
   r=   r   )ra   r\   rG  	sync_dicts       rW   test_async_eth_syncingz)AsyncEthModuleTest.test_async_eth_syncing=  s      ,,,'"gg&666ge###WZ1I"i///!Y...!Y...i8999i7888i7888  -s   B,B*BB,c                   K   |j                   }|j                  j                  |d       d {   }|t        dd       k(  sJ |j                  j                  |d       d {   }|t        dd d      k(  sJ |j                  j                  |d       d {   }|t        dd d      k(  sJ |j                  j                  |d	       d {   }|t        d
      k(  sJ t	        |d d       dk(  sJ |j                  j                  |d       d {   }|t        d      k(  sJ t	        |d d       dk(  sJ y 7 7 7 7 v7 1wNr   r   ru  rj   >00000000000000000000000000000000000000000000000000000000000000rf  r|   02r   B0x746872656500000000000000000000000000000000000000000000000000000ar  s   threer  B0x666f757200000000000000000000000000000000000000000000000000000008s   fourrQ   r_   get_storage_atr   bytes)	ra   r\   async_storage_contractasync_storage_contract_addressslot_0slot_1slot_2slot_3slot_4s	            rW   test_async_eth_get_storage_atz0AsyncEthModuleTest.test_async_eth_get_storage_atO  s~     *@)G)G&||223QSTUUByk"23333||223QSTUUByk"45555||223QSTUUByk"45555||223QSTUUP
 
 	
 
 VBQZ H,,,||223QSTUUP
 
 	
 
 VBQZ G+++' V V V V VsX   ,EE6E%E&7EE
7EEAEE)EE
EEEc                    K   t        |d|j                  i      5  |j                  j                  t	        d      d       d {   }|t        dd d      k(  sJ 	 d d d        y 7 "# 1 sw Y   y xY wwNzstorage.ethrj   r   rL  rf  r   rQ   r_   rQ  r7   r   )ra   r\   rS  storages       rW   &test_async_eth_get_storage_at_ens_namez9AsyncEthModuleTest.test_async_eth_get_storage_at_ens_namej  su      8m5K5S5S%TU 	;$LL77M8JANNGhI;b'9::::	; 	;N	; 	;s.   A5)A)A'A)	A5'A))A2.A5c                 L  K   |j                   j                   d {   }t        j                  t              5  |j                   j                  t        t        t        |d   j                                           d       d {    d d d        y 7 w7 # 1 sw Y   y xY wwr^   
r_   r  r   r   r)   rQ  r   r   r   r3  r  s      rW   -test_async_eth_get_storage_at_invalid_addressz@AsyncEthModuleTest.test_async_eth_get_storage_at_invalid_addressr  s      "...]]>* 	,,--
6(1+2C2C2E+F GH!  	 	 /	 	s9   B$BB$ABBB
B$BB!B$c                     |j                   j                  }||j                   _        |j                   j                  }||k(  sJ ||j                   _        y rF  r_   default_account)ra   r\   rh   current_default_accountre  s        rW   #test_async_provider_default_accountz6AsyncEthModuleTest.test_async_provider_default_account|  sO    
 #+,,">"> (O$",,66"IIII (?$rY   c                     |j                   j                  }|dk(  sJ t        d      |j                   _        |j                   j                  }|t        d      k(  sJ d|j                   _        y Nr   r  r_   default_blockr   )ra   r\   rk  s      rW   !test_async_provider_default_blockz4AsyncEthModuleTest.test_async_provider_default_block  sd    
 !22((( &1%7" 22E 2222 &."rY   c                    K   |j                   j                  |d          d {   }t        |      sJ |dk(  sJ y 7 wNr  r   r_   get_block_transaction_countr   ra   r\   r  r,  s       rW   9test_eth_getBlockTransactionCountByHash_async_empty_blockzLAsyncEthModuleTest.test_eth_getBlockTransactionCountByHash_async_empty_block  sN      #+,,"J"Jf%#
 
 +,,, A%%%
   "A >A c                    K   |j                   j                  |d          d {   }t        |      sJ |dk(  sJ y 7 wNr  r   ro  rq  s       rW   ;test_eth_getBlockTransactionCountByNumber_async_empty_blockzNAsyncEthModuleTest.test_eth_getBlockTransactionCountByNumber_async_empty_block  sN      #+,,"J"Jh'#
 
 +,,, A%%%
rs  c                    K   |j                   j                  |d          d {   }t        |      sJ |dk\  sJ y 7 wNr  rj   ro  ra   r\   r  r,  s       rW   6test_eth_getBlockTransactionCountByHash_block_with_txnzIAsyncEthModuleTest.test_eth_getBlockTransactionCountByHash_block_with_txn  sN      #+,,"J"J (#
 
 +,,, A%%%
rs  c                    K   t        j                  t        d      5  |j                  j	                  |d          d {   }t        |      sJ |dk(  sJ 	 d d d        y 7 "# 1 sw Y   y xY ww)NLget_uncle_count is deprecated: all get_uncle\* methods will be removed in v8r   r  r   r   r  DeprecationWarningr_   get_uncle_countr   ra   r\   r  uncle_counts       rW   !test_eth_getUncleCountByBlockHashz4AsyncEthModuleTest.test_eth_getUncleCountByBlockHash  sw      \\-
 	$
 !) < <=Nv=V WWKk***!###	$ 	$
 X	$ 	$.   A1"A% A#A%	A1#A%%A.*A1c                    K   t        j                  t        d      5  |j                  j	                  |d          d {   }t        |      sJ |dk(  sJ 	 d d d        y 7 "# 1 sw Y   y xY ww)Nr|  r   r  r   r}  r  s       rW   #test_eth_getUncleCountByBlockNumberz6AsyncEthModuleTest.test_eth_getUncleCountByBlockNumber  s|      \\-
 
	$
 !) < <!(+! K k***!###
	$ 
	$

	$ 
	$r  c                    K   |j                   j                  |d          d {   }t        |      sJ |dk\  sJ y 7 wNr  rj   ro  ry  s       rW   8test_eth_getBlockTransactionCountByNumber_block_with_txnzKAsyncEthModuleTest.test_eth_getBlockTransactionCountByNumber_block_with_txn  sN      #+,,"J"J *#
 
 +,,, A%%%
rs  c                   K   |j                   j                  |d       d {   }t        |      sJ t        |      dk(  sJ |j                   j                  |t	        d             d {   }||k(  sJ |j                   j                  |d       d {   }||k(  sJ |j                   j                  |d       d {   }||k(  sJ |j                   j                  |d       d {   }||k7  sJ y 7 7 7 g7 >7 w	N#   Message tö sign. Longer than hash!textr   H0x4d6573736167652074c3b6207369676e2e204c6f6e676572207468616e206861736821rR   l   !hBqFD\Y37oL@\KbvH3asJ5s#   Message tö sign. Longer than hash!zdifferent message is differentr_   signr   r   r   )ra   r\   rh   r   hexsignintsign	bytessignnew_signatures           rW   test_async_eth_signz&AsyncEthModuleTest.test_async_eth_sign  s<     #,,++36 , 
 
	 	"""9~,,, !))3Z * 
 
 )### ))3T
 
 )###",,++38
 
	 I%%%&ll//31 0 
 
 	)))A




sX   !DC=A
D.C?/*DD*DD+D0D1D?DDDDc                    K   t        |d|i      5  |j                  j                  t        d      d       d {   }t	        |      sJ t        |      dk(  sJ 	 d d d        y 7 +# 1 sw Y   y xY wwNzunlocked-acct.ethr  r  r   )r   r_   r  r7   r   r   )ra   r\   rh   r   s       rW   test_async_eth_sign_ens_namesz0AsyncEthModuleTest.test_async_eth_sign_ens_names	  s      *,ST
 	1 'll//'(/T 0  I I&&&y>[000	1 	1	1 	1s,   A5*A)A'!A)	A5'A))A2.A5c                 "  K   ||t        d      d|j                  dd      d}|j                  j                  |       d {   }|j                  dd      |d<   |j                  j	                  ||       d {   }|j                  j                  |       d {   }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d	   dk(  sJ |d
   dk(  sJ |d   |d   k(  sJ y 7 7 7 nwNrj   rk   r{   rl   r|   rq   rm   rn   ro   rp   	r@   r~   r_   rr   replace_transactionrs   r   r
   r   )ra   r\   rh   ru   rv   replace_txn_hashreplace_txns          rW   )test_async_eth_replace_transaction_legacyz<AsyncEthModuleTest.test_async_eth_replace_transaction_legacy	  s0     <9V 62 

 "66zBB!)F!;
:!)!A!A(J!WW$LL889IJJoz&7I!J
 	
 
 tOZ5EF
 	
 
 7#q(((5!U***:&*Z*@@@@ C XJs7   A DD	8D;D<"DDA+DDDc           	      d  K   |j                  dd      }|j                  dd      }||t        d      d||j                  dd      d}|j                  j                  |       d {   }||d<   ||d<   |j                  j	                  ||       d {   }|j                  j                  |       d {   }t        |d	   t        t        |d	               sJ t        |d
   t        t        |d
               sJ |d   dk(  sJ |d   dk(  sJ |d   |k(  sJ |d   |k(  sJ y 7 7 7 uwNr|   r{   r   rj   rk   r   r   r   rm   rn   ro   rp   	r~   r@   r_   rr   r  rs   r   r
   r   )	ra   r\   rh   rI  three_gwei_in_weiru   rv   r  r  s	            rW   "test_async_eth_replace_transactionz5AsyncEthModuleTest.test_async_eth_replace_transaction9	  sf     #//!V4$OOAv6 <9V+$,OOAv$> 

 "66zBB%6
>"-<
)*!)!A!A(J!WW$LL889IJJoz&7I!J
 	
 
 tOZ5EF
 	
 
 7#q(((5!U***>*.????12oEEE# C
 XJs7   A%D0'D*(-D0D,"D08D.9A2D0,D0.D0c           	        K   ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |       d {   }|j                  dd      }||d<   ||d<   t	        j
                  t        d	
      5  |j                  j                  ||       d {    d d d        y 7 i7 # 1 sw Y   y xY wwNrj   rk   r   r{   r|   r   r   r   z#replacement transaction underpricedr   r@   r~   r_   rr   r   r   r2   r  )ra   r\   rh   ru   rv   one_gwei_in_weis         rW   .test_async_eth_replace_transaction_underpricedzAAsyncEthModuleTest.test_async_eth_replace_transaction_underpriced]	  s      <9V$OOAv6$,OOAv$> 

 "66zBB"//!V4%4
>"-<
)*]]</TU 	I,,228ZHHH	I 	I C I	I 	Is<   ACB=;C C/B?0C4
C?CC
Cc           	      *  K   ||t        d      d|j                  dd      |j                  dd      d}t        j                  t              5  |j
                  j                  t        d      |       d {    d d d        y 7 # 1 sw Y   y xY wwNrj   rk   r   r{   r   B0x98e8cc09b311583c5079fa600f6c2a3bea8611af168c52e4b60b5b243a441997r@   r~   r   r   r0   r_   r  r   r   s       rW   ;test_async_eth_replace_transaction_non_existing_transactionzNAsyncEthModuleTest.test_async_eth_replace_transaction_non_existing_transactionw	  s      <9V$OOAv6$,OOAv$> 

 ]]./ 	,,22X 	  	 		 	s0   AB)B7B8B<	BBBBc           	        K   ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |       d {   }|j                  j	                  |d       d {    |j                  dd      |d	<   |j                  dd      |d
<   t        j                  t        d      5  |j                  j                  ||       d {    d d d        y 7 7 y7 # 1 sw Y   y xY wwNrj   rk   r|   r{   r   r(  r)  r   r   r   zSupplied transaction with hashr   	r@   r~   r_   rr   r0  r   r   r4   r  ra   r\   rh   ru   rv   s        rW   0test_async_eth_replace_transaction_already_minedzCAsyncEthModuleTest.test_async_eth_replace_transaction_already_mined	  s      <9V$OOAv6$,OOAv$> 

 "66zBBll77"7MMM%-__Q%?
>"-5__Q-G
)*]]>1QR 	I,,228ZHHH	I 	I CM
 I	I 	IsO   ADC0$D8C29A	D C6"C4#C6'
D2D4C66C?;Dc           	      (  K   ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |       d {   }|j                  j	                  |       d {   }|j                  dd      |d<   |j                  dd      |d<   t        |d	   dz         |d	<   t        j                  t              5  |j                  j                  ||       d {    d d d        y 7 7 7 # 1 sw Y   y xY ww
Nrj   rk   r|   r{   r   r   r   r   r   
r@   r~   r_   rr   rs   r:   r   r   r4   r  )ra   r\   r   ru   rv   rw   s         rW   2test_async_eth_replace_transaction_incorrect_noncezEAsyncEthModuleTest.test_async_eth_replace_transaction_incorrect_nonce	  s    
 2/V$OOAv6$,OOAv$> 

 "66zBBLL00::%-__Q%?
>"-5__Q-G
)*#CL1$45
7]]>* 	I,,228ZHHH	I 	I C: I	I 	IsO   ADD "D6D7AD D2D3D7
DDDDDc                 j  K   ||t        d      d|j                  dd      d}|j                  j                  |       d {   }|j                  dd      |d<   t	        j
                  t              5  |j                  j                  ||       d {    d d d        y 7 `7 # 1 sw Y   y xY wwNrj   rk   r|   r{   rl   rq   r@   r~   r_   rr   r   r   r4   r  r  s        rW   4test_async_eth_replace_transaction_gas_price_too_lowzGAsyncEthModuleTest.test_async_eth_replace_transaction_gas_price_too_low	  s      <9V 62 

 "66zBB!)F!;
:]]>* 	I,,228ZHHH	I 	I C I	I 	Is<   A B3B#2B35 B'B%B'
B3%B''B0,B3c                   K   |j                  dd      }||t        d      d|d}|j                  j                  |       d {   }|j	                  d       |j                  j                  ||       d {   }|j                  j                  |       d {   }|d   t        j                  |dz        k(  sJ y 7 }7 J7 )wNrj   r{   rk   rl   rq         ?	r~   r@   r_   rr   popr  rs   mathceil)ra   r\   r   r`   ru   rv   r  r  s           rW   ?test_async_eth_replace_transaction_gas_price_defaulting_minimumzRAsyncEthModuleTest.test_async_eth_replace_transaction_gas_price_defaulting_minimum	  s      OOAv.	 2/V! 

 "66zBBz"!)!A!A(J!WW$LL889IJJ:&$))+
 
 	
 
 C XJs6   ACC4C9C:"CC&CCCc                   K   ||t        d      d|j                  dd      d}|j                  j                  |       d {   }|j                  dd      dddt        d	t         ffd
}|j                  j                  |       |j                  d       |j                  j                  ||       d {   }|j                  j                  |       d {   }|d   k(  sJ |j                  j                  d        y 7 7 O7 .w)Nrj   rk   r{   rl   r|   	_async_w3rM   rR  rO   c                     S rF  rG  )r  rR  rI  s     rW   higher_gas_price_strategyz}AsyncEthModuleTest.test_async_eth_replace_transaction_gas_price_defaulting_strategy_higher.<locals>.higher_gas_price_strategy	  s     #"rY   rq   	r@   r~   r_   rr   r?   rL  r  r  rs   )	ra   r\   r   ru   rv   r  r  r  rI  s	           @rW   Gtest_async_eth_replace_transaction_gas_price_defaulting_strategy_higherzZAsyncEthModuleTest.test_async_eth_replace_transaction_gas_price_defaulting_strategy_higher	  s     
 2/V 62 

 "66zBB"//!V4	#'	#/7	#	#
 	++,EFz"!)!A!A(J!WW$LL889IJJ
#6	
6++D1# C XJs7   A DDA5D9D	:"DD+D	DDc                 $  K   |j                  dd      }||t        d      d|d}|j                  j                  |       d {   }dddt        d	t        fd
}|j                  j                  |       |j                  d       |j                  j                  ||       d {   }|j                  j                  |       d {   }|d   t        j                  |dz        k(  sJ |j                  j                  d        y 7 7 e7 Dw)Nr|   r{   rj   rk   rl   r\   rM   rw   rO   c                 &    | j                  dd      S Nrj   r{   rb  )r\   rw   s     rW   lower_gas_price_strategyz{AsyncEthModuleTest.test_async_eth_replace_transaction_gas_price_defaulting_strategy_lower.<locals>.lower_gas_price_strategy
  s    ??1f--rY   rq   r  r~   r@   r_   rr   r?   rL  r  r  rs   r  r  )	ra   r\   r   r`   ru   rv   r  r  r  s	            rW   Ftest_async_eth_replace_transaction_gas_price_defaulting_strategy_lowerzYAsyncEthModuleTest.test_async_eth_replace_transaction_gas_price_defaulting_strategy_lower 
  s      OOAv.	1/V! 

 "66zBB	./? 	.h 	.SV 	. 	++,DEz"!)!A!A(J!WW$LL889IJJ:&$))I4E*FFFF++D1 C XJs8   ADD
A!D&D'"D	D
ADDDc                   K   |j                   j                  i        d {   }|j                   j                  |j                         d {   }t	        |      sJ |rJ |j                   j                  |j                         d {   }t	        |      sJ |rJ |j                   j                  |j                         d {   }|du sJ y 7 7 7 M7 wre   r_   filterget_filter_changes	filter_idr   get_filter_logsuninstall_filter)ra   r\   r  changesr  r   s         rW   test_async_eth_new_filterz,AsyncEthModuleTest.test_async_eth_new_filter
  s     ||**2.. 778H8HIIG$$${\\11&2B2BCCD!!!x||44V5E5EFF~~ /I D GsE   CC,CC=CC=C
CCCCCc                 f  K   |j                   j                  d       d {   }t        |j                        sJ |j                   j	                  |j                         d {   }t        |      sJ |j                   j                  |j                         d {   }|du sJ y 7 7 G7 wNr   Tr_   r  r   r  r  r   r  ra   r\   r  r  r   s        rW   test_async_eth_new_block_filterz2AsyncEthModuleTest.test_async_eth_new_block_filter)
  s     ||**844))*** 778H8HIIG$$$||44V5E5EFF~~ 5 J Gs4   B1B+AB1%B-&9B1B/ B1-B1/B1c                 n  K   |j                   j                  d       d {   }t        |j                        sJ |j                   j	                  |j                         d {   }t        |      sJ |rJ |j                   j                  |j                         d {   }|du sJ y 7 7 K7 wNr  Tr  r  s        rW   -test_async_eth_new_pending_transaction_filterz@AsyncEthModuleTest.test_async_eth_new_pending_transaction_filter4
  s       ||**955))*** 778H8HIIG$$${||44V5E5EFF~~ 6 J Gs4   B5B/AB5%B1&=B5#B3$B51B53B5c                 X  K   |j                   j                  i        d {   }t        |j                        sJ |j                   j	                  |j                         d {   }|du sJ |j                   j	                  |j                         d {   }|du sJ y 7 7 @7 wNTFr_   r  r   r  r  )ra   r\   r  successfailures        rW   test_async_eth_uninstall_filterz2AsyncEthModuleTest.test_async_eth_uninstall_filterB
  s     ||**2..))*** 55f6F6FGG$ 55f6F6FGG% / H Hs4   B*B$AB*%B&&2B*B(B*&B*(B*)r\   rM   rO   N)r\   rM   r  rH   rO   N)r\   rM   r  rH   rO   N)r\   rM   r?  rH   rO   N)r\   rM   r|  rH   rO   N)r|  rH   rO   N)r|  rH   r}  rG   rO   N)r\   rM   rS  rH   rO   N)__name__
__module____qualname__r   markr  rb   rg   r   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r#   r   r   r  r  rC  rN  rX  parametrizer@   rh  rl  rs  r<   r  r  r8   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	   r   r   r  r  r  r  r  r  r)  r-  r>  rH  rJ  rM  rR  rW  r_  rd  r   r   r   r{  r  r  r  ranger  r  r  r  r  r  r  r  r  r  r  r  xfailr  r  r   r$  r/  r5  r=  r@  rI  rZ  r_  rb  rg  rl  rr  rv  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rG  rY   rW   r[   r[      s>   [[ 
 [[$ $ [[9"9 2A9 
	9 9* [[Q"Q 2AQ 
	Q Q> [[#Y"#Y 2A#Y 
	#Y #YJ [[<"< 2A< 
	< <4 [[3-"3- 2A3-  ()9(:D(@A	3-
 
3- 3-j [[5"5 2A5  ()9(:D(@A	5
 
5 5n [[<(<IX<	< <( [[<(<IX<	< <0 [[@(@IX@	@ @8 [[6"6 2A6 
	6 62 [[6"6 2A6 
	6 6. [[8"8 2A8 
	8 8. [[$"$ 2A$ 
	$ $( [[<"< 2A< 
	< <" [[<"< 2A< 
	< <" [[#"# 2A# 
	# #* [[<"< 2A< 
	< <$ [[<"< 2A< 
	< <0 [[0(0:>}:M0	0 0$ [[1(1@F1	1 1& [[4(4@F4	4 4& [[R,"R, %R, -	R,
 
R, R,h [[2"2 2A2 
	2 20 [[2"2 2A2 
	2 20 [[[[%N<M+N  "2""2 2A"2 	"2
 
"2 "2H [[2"2 2A2 
	2 22 [[ "  2A  
	    [[[[ t 2i[!12FR	{;K4LM  !%=$r)%56I;?O8PQ	
&
"
 -
 $	

 

' (
 [[: : [[:(:=F:	: : [[/(/	/ / [[, , [[8(8:>}:M8	8 8& [[:(:=F:	: : [[7(7	7 7 [[% % [[>(>=F>	> > [[)()=F)	) ) [[=(==F=	= = [[%(%=F%	% % [[6(6=F6	6 6 [[0(0=F0	0 0 [[0(0=F0	0 0 [[*(*=F*	* * [[@(@	@ @ [[*(*=F*	* * [[*(*=F*	* * [[*(*=F*	* * [[N(N@IN	N N [[)():@)	) ) [[A(A	A A [[&)"&) (&) 2A	&)
 
&) &)P [[[[8=,:WX" $)h#7 
	 Y " [[S(S	S S [[  [[(GV	  [[" - 
	  [[(BQ	  [[1"1 2A1 -	1
 
1 1: [[	&"	& 2A	& 
		& 	& [[(?N	   [[#%"#%  /#% 
	#% #%J [[[[ t 2i[!12FR	{;K4LM  !%=$r)%56I;?O8PQ	
&
"
 -
 $	

 

' (
 [[(?N	  [[0"0  /0 (7	0
 
0 0$ [[0"0  /0 (7	0
 
0 0  [[0"0  /0 (7	0
 
0 0( [[0"0  /0 (7	0
 
0 0" [[2J2JA3KB4L2J2J2J2J2J
	
 [[)") &5) 	)
 S	) 
) )  [[X"X )8X (7	X
 #X 
X X2 [[#:"#: )8#: 
	#: #:J [[:": )8: (7	:
 #: 
: :4 [[[[_eBl;J"J )8J 	J
 
J < J  [[" )8 (7	
 # 
 , [[[[8:NO#J"#J )8#J (7	#J
 ##J $'#J 
#J P #JJ [[" )8 (7	
 # 
 , [[
(7
 

 
 [[U(7U #U 
	U U  [[+: +:Z [[+ +
 [['"' (' 	'
 
' '( [[A"A 2AA 
	A A$ [[K"K (1K !0	K
 "K 
K K0 [['"' (' 	'
 
' '( [[[[<U  G"G 2AG 
	G 
G, [[K"K (1K !0	K
 "K 
K K0 [[I I [[" "
 [[& (& IR& 	&  & P [[/
"/
 (1/
 )8	/

 "/
 
/
 /
b [[+
"+
 (1+
 )8	+

 "+
 
+
 +
Z [[	 (	 		  	  [[9 9" [[,(,BQ,	, ,4 [[;(;BQ;	; ; [[(	 ?"? 2A? 
	?.". 
.  [[&(&=F&	& & [[&(&=F&	& & [[&(&@I&	& & [[$($=F$	$ $ [[$($=F$	$ $ [[&(&@I&	& & [[%*"%* 2A%* 
	%* %*N [[1"1 2A1 
	1 1 [[A"A 2AA 
	A A8 [[!F"!F 2A!F 
	!F !FF [[I"I 2AI 
	I I2 [[" 2A 
	 * [[I"I 2AI 
	I I* [[I(IIXI	I I( [[I"I 2AI 
	I I$ [[
(
IX
	
 
, [[2(2IX2	2 2: [[2(2IX2	2 22 [[  [[  [[(	  [[   rY   r[   c                      e Zd ZddZddZddZdddeddfd	Zdd
ZddZ	ddZ
dddee   ddfdZddZddZddZddZddZddZej*                  j-                  dddg      dddededdfd       ZddZ	 	 	 	 	 	 ddZddZdddeddfd Zdddeddfd!Zdd"Zdddeddfd#Z dddeddfd$Z!ddd%eddfd&Z"ddd%eddfd'Z#dddeddfd(Z$dddeddfd)Z%ddd*eddfd+Z&ddd*eddfd,Z'	 	 	 	 	 	 dd.Z(	 	 	 	 	 	 dd0Z)ddded-dddfd1Z*dddeddfd2Z+dddeddfd3Z,ddded4e-dgdf   ddfd5Z.ddded4e-dgdf   ddfd6Z/ddd7eddfd8Z0ddd7eddfd9Z1ddd7eddfd:Z2ddd7eddfd;Z3ddd7eddfd<Z4dddeddfd=Z5dddeddfd>Z6ddd7eddfd?Z7dddeddfd@Z8dddeddfdAZ9dddeddfdBZ:dddeddfdCZ;dddeddfdDZ<dddeddfdEZ=dddeddfdFZ>dddeddfdGZ?ej*                  j-                  dHdIdJdKgL      dddedHe@ddfdM       ZAdddeddfdNZBdddeddfdOZCdddeddfdPZDdddeddfdQZEdddeddfdRZFdddeddfdSZGdddeddfdTZHddd7eddfdUZIdddeddfdVZJddd7eddfdWZKddd7eddfdXZLddd7eddfdYZMddd7eddfdZZNddd7eddfd[ZOddd\ePddfd]ZQddd\ePddfd^ZRddd\ePd-dddfd_ZSdd`ZT	 	 	 	 	 	 ddbZUej*                  j-                  dcdddd ePde       ePdedf        ePdedf       idg ePdh       ePdh      di ePdedf        ePdedf       idjf      ddd-ddceVddfdk       ZW	 	 	 	 	 	 ddlZXdddadd7eddfdmZYdddadd7eddfdnZZdddadd7eddfdoZ[dddadd7eddfdpZ\ddqZ]ej*                  j-                  drdsg fdtg fdudvgfdwdxgfdyg fdzg fd{g fd|g fd}g ff	      ddd~dde^dce_e`   ddf
d       Zaddddd7eddddf
dZb	 	 	 	 	 	 ddZcddddd7eddddf
dZdej*                  j-                  d eedxd            dddddefddfd       Zgddddd7eddddf
dZhej*                  j-                  dg d      ddddd7edddefddfd       Ziddddd7eddddf
dZj	 	 	 	 ddZk	 	 	 	 	 	 ddZldddadd7eddfdZmdddadd7eddfdZndddadd7eddfdZodddadd7eddfdZpdddeddfdZqdddeddfdZrej*                  j-                  dcdddd ePde       ePdedf        ePdedf       idg ePdh       ePdh      di ePdedf        ePdedf       idjf      ddd-ddceVddfd       ZsdddeddfdZtdddeddfdZuddZvdddeddfdZwddZxdddeddfdZydddeddfdZzdddeddfdZ{dddeddfdZ|dddeddfdZ}ddd%eddfdZ~dddeddfdZddZdddeddfdZdddeddfdZdddeddfdZdddePddfdZdddePddfdZddd%edePddfdZddd%edePddfdZddd%edePddfdZdddeddfdZddded/ddePddf
dZddd%edePddfdZdddeddfdZddded/ddePddf
dZddZddZddZdddeddfdZdddededePddf
dZdddededePddf
dZddZddd-dd7eddfdZddZdddePddfdZddZddded%eddfdZej*                  j-                  ddef      dddeefef   ddfdń       Z	 	 	 	 ddƄZdddeddfdǄZ	 	 	 	 ddȄZy)EthModuleTestrL   rK   rO   Nc                 @   |j                   j                  }t        |      st        |      sJ t        |      r|du sJ y t        |      rSt	        t
        |      }d|v sJ d|v sJ d|v sJ t        |d         sJ t        |d         sJ t        |d         sJ y y rB  rF  )ra   rL   rG  rH  s       rW   test_eth_syncingzEthModuleTest.test_eth_syncingO
  s    &&..'"gg&666ge###WZ1I"i///!Y...!Y...i8999i7888i7888 rY   c                 >    |j                   j                  }|dk(  sJ y r  r  )ra   rL   r   s      rW   test_eth_chain_idzEthModuleTest.test_eth_chain_id`
  s    66???***rY   c                    |j                   j                  dddg      }t        |d         sJ t        |d         sJ t        |d         sJ |d   dk\  sJ t        |d         sJ t	        |d         dkD  rt        |d   d         sJ y y r  r  ra   rL   r  s      rW   r  z"EthModuleTest.test_eth_fee_historye
  s    ff((Hrd;K8999K7888+m4555=)Q...K1222{8$%)H 5a 8999 *rY   empty_blockc                 $   |j                   j                  d|d   dg      }t        |d         sJ t        |d         sJ t        |d         sJ |d   dk\  sJ t        |d         sJ t	        |d         dkD  rt        |d   d         sJ y y r  r  )ra   rL   r  r  s       rW   r  z/EthModuleTest.test_eth_fee_history_with_integero
  s     ff((K,AB4HK8999K7888+m4555=)Q...K1222{8$%)H 5a 8999 *rY   c                     |j                   j                  dd      }t        |d         sJ t        |d         sJ t        |d         sJ |d   dk\  sJ y r  r  r  s      rW   r  z8EthModuleTest.test_eth_fee_history_no_reward_percentiles{
  sd    ff((H5K8999K7888+m4555=)Q...rY   c                 X    |j                   j                  }t        |      sJ |dkD  sJ y r^   )r_   r`   r   )ra   rL   r`   s      rW   rb   z EthModuleTest.test_eth_gas_price
  s+    FF$$	)$$$1}}rY   c                 J    |j                   j                  }t        |      sJ y rF  r  )ra   rL   rf  s      rW   r  z'EthModuleTest.test_eth_max_priority_fee
  s!    6622*+++rY   r   c                 6    ||t        d      i it        d      ddggii      5  t        j                  t        d      5  |j                  j
                  }t        |      sJ |t        k(  sJ 	 d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY wr  r  )ra   rL   r   rf  s       rW   r  zDEthModuleTest.test_eth_max_priority_fee_with_fee_history_calculation
  s     $%?@"E%&67(aSE9JK
 	<
 8 	< $&66#:#: !"2333'+;;;;	<	< 	<
	< 	<	< 	<s#   B/B2BB	BBc                     |j                   j                  }t        |      sJ t        |      dk7  sJ t	        d |D              sJ y )Nr   c              3   2   K   | ]  }t        |        y wrF  r  r  s     rW   r  z2EthModuleTest.test_eth_accounts.<locals>.<genexpr>
  r  r  r  )ra   rL   r  s      rW   test_eth_accountszEthModuleTest.test_eth_accounts
  sC    66??H%%%8}!!!HxHHHHrY   c                 X    |j                   j                  }t        |      sJ |dk\  sJ y r^   r"  )ra   rL   r#  s      rW   test_eth_blob_base_feez$EthModuleTest.test_eth_blob_base_fee
  s-    ,,-(((!!!rY   c                 X    |j                   j                  }t        |      sJ |dk\  sJ y r^   )r_   r  r   ra   rL   r  s      rW   test_eth_block_numberz#EthModuleTest.test_eth_block_number
  s-    vv**,'''q   rY   c                 `    |j                   j                         }t        |      sJ |dk\  sJ y r^   )r_   get_block_numberr   r  s      rW   test_eth_get_block_numberz'EthModuleTest.test_eth_get_block_number
  s0    vv..0,'''q   rY   c                 x   |j                   j                  d   }t        j                  t              5  |j                   j                  t        t        t        |j                                                  d d d        |j                   j                  |      }t        |      sJ |dk\  sJ y # 1 sw Y   9xY wr^   r  )ra   rL   r   rw  s       rW   r  z"EthModuleTest.test_eth_get_balance
  s    &&//!$]]>* 	UFFz&:Q/RST	U &&$$W-'"""!||	U 	Us   AB00B9c                     |j                   j                  d      }|d   }|j                   j                  |d      }|j                   j                  |d      }t        |      sJ t        |      sJ ||k7  sJ y )Nr   minerr   )r_   r   r  r   )ra   rL   r  miner_addressbalance_genesislater_balances         rW   *test_eth_get_balance_with_block_identifierz8EthModuleTest.test_eth_get_balance_with_block_identifier
  sv    ((+%g.&&,,]A>**=(C/***-(((///rY   zaddress, expect_success)test-address.ethT)znot-an-address.ethFrQ   expect_successc                 l   t        |d|j                  j                  d   i      5  |r/|j                  j                  |      }t	        |      sJ |dk\  s?J t        j                  t              5  |j                  j                  |       d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nr  r   )r   r_   r  r  r   r   r   r,   )ra   rL   rQ   r  rw  s        rW   "test_eth_get_balance_with_ens_namez0EthModuleTest.test_eth_get_balance_with_ens_name
  s     2 2BFFOOA4FGH 	0&&,,W5!'***!|#|]]<0 0FF&&w/0	0 	00 0	0 	0s$   AB*1BB*B'	#B**B3rI   c                 6   |j                   }|j                  j                  |d      }|t        dd       k(  sJ |j                  j                  |d      }|t        dd d      k(  sJ |j                  j                  |d      }|t        dd d      k(  sJ |j                  j                  |d	      }|t        d
      k(  sJ t	        |d d       dk(  sJ |j                  j                  |d      }|t        d      k(  sJ t	        |d d       dk(  sJ y rK  rP  )	ra   rL   storage_contractstorage_contract_addressrU  rV  rW  rX  rY  s	            rW   test_eth_get_storage_atz%EthModuleTest.test_eth_get_storage_at
  sA   #3#;#; &&'?CByk"23333&&'?CByk"45555&&'?CByk"45555&&'?CP
 
 	
 
 VBQZ H,,,&&'?CP
 
 	
 
 VBQZ G+++rY   c                     t        |d|j                  i      5  |j                  j                  t	        d      d      }|t        dd d      k(  sJ 	 d d d        y # 1 sw Y   y xY wr\  r]  )ra   rL   r  r^  s       rW    test_eth_get_storage_at_ens_namez.EthModuleTest.test_eth_get_storage_at_ens_name
  sf     2/?/G/GHI 	;ff++C,>BGhI;b'9::::	; 	; 	;s   :AA&c                    |j                   j                  d   }t        j                  t              5  |j                   j                  t        t        t        |j                                           d       d d d        y # 1 sw Y   y xY wr^   ra  ra   rL   r   s      rW   'test_eth_get_storage_at_invalid_addressz5EthModuleTest.test_eth_get_storage_at_invalid_address
  sa    &&//!$]]>* 	FF!!
6'--/+B CDa	 	 	s   ABB!keyfile_account_address_dual_typec                 b    |j                   j                  |      }t        |      sJ |dk\  sJ y r^   r+  ra   rL   r  r,  s       rW   r-  z,EthModuleTest.test_eth_get_transaction_count
  s;     FF88-
 +,,, A%%%rY   c                     t        |d|i      5  |j                  j                  t        d            }t	        |      sJ |dk\  sJ 	 d d d        y # 1 sw Y   y xY w)Nzunlocked-acct-dual-type.ethr   )r   r_   r  r7   r   r  s       rW   'test_eth_get_transaction_count_ens_namez5EthModuleTest.test_eth_get_transaction_count_ens_name  sl     .0QR
 	* !# < <12! /000$)))	* 	* 	*s   9AAc                    |j                   j                  d   }t        j                  t              5  |j                   j                  t        t        t        |j                                                  d d d        y # 1 sw Y   y xY wr^   )
r_   r  r   r   r)   r  r   r   r   r3  r  s      rW   .test_eth_get_transaction_count_invalid_addressz<EthModuleTest.test_eth_get_transaction_count_invalid_address  s_    &&//!$]]>* 	FF((
6'--/+B CD	 	 	s   ABB
c                 h    |j                   j                  |d         }t        |      sJ |dk(  sJ y rn  ro  ra   rL   r  r,  s       rW   3test_eth_getBlockTransactionCountByHash_empty_blockzAEthModuleTest.test_eth_getBlockTransactionCountByHash_empty_block  s;     FF>>{6?RS+,,, A%%%rY   c                 h    |j                   j                  |d         }t        |      sJ |dk(  sJ y ru  ro  r#  s       rW   5test_eth_getBlockTransactionCountByNumber_empty_blockzCEthModuleTest.test_eth_getBlockTransactionCountByNumber_empty_block#  s;     FF>>{8?TU+,,, A%%%rY   block_with_txnc                 h    |j                   j                  |d         }t        |      sJ |dk\  sJ y rx  ro  ra   rL   r'  r,  s       rW   rz  zDEthModuleTest.test_eth_getBlockTransactionCountByHash_block_with_txn+  s;     FF>>~f?UV+,,, A%%%rY   c                 h    |j                   j                  |d         }t        |      sJ |dk\  sJ y r  ro  r)  s       rW   r  zFEthModuleTest.test_eth_getBlockTransactionCountByNumber_block_with_txn3  s;     FF>>~h?WX+,,, A%%%rY   c                     t        j                  t        d      5  |j                  j	                  |d         }t        |      sJ |dk(  sJ 	 d d d        y # 1 sw Y   y xY w)N,All get_uncle\* methods have been deprecatedr   r  r   r}  ra   rL   r  r  s       rW   r  z/EthModuleTest.test_eth_getUncleCountByBlockHash;  sb     \\&U
 	$ &&00V1DEKk***!###	$ 	$ 	$   3AA"c                     t        j                  t        d      5  |j                  j	                  |d         }t        |      sJ |dk(  sJ 	 d d d        y # 1 sw Y   y xY w)Nr,  r   r  r   r}  r-  s       rW   r  z1EthModuleTest.test_eth_getUncleCountByBlockNumberF  sb     \\&U
 	$ &&00X1FGKk***!###	$ 	$ 	$r.  math_contract_addressc                 ~    |j                   j                  |      }t        |t              sJ t	        |      dkD  sJ y r^   r  ra   rL   r0  r:  s       rW   r  zEthModuleTest.test_eth_get_codeQ  s7     vv45$)))4y1}}rY   c                     t        |d|i      5  |j                  j                  t        d            }t	        |t
              sJ t        |      dkD  sJ 	 d d d        y # 1 sw Y   y xY w)Nzmathcontract.ethr   )r   r_   r1  r7   r  r   r   r2  s       rW   test_eth_get_code_ens_addressz+EthModuleTest.test_eth_get_code_ens_addressX  sb     2 24IJK 	!66??3'9#:;DdH---t9q= =	! 	! 	!s   AA  A)math_contractc                     t        j                  t              5  |j                  j	                  t        t        t        |j                  j                                                  d d d        y # 1 sw Y   y xY wrF  r  )ra   rL   r5  s      rW   r  z/EthModuleTest.test_eth_get_code_invalid_address`  sV     ]]>* 	FFOO
6-2G2G2M2M2O+P QR	 	 	s   AA22A;emitter_contractc                     |j                   j                  |j                  |j                   j                        }t	        |t
              sJ t        |      dkD  sJ y )Nr!  r   )r_   r1  rQ   r  r  r   r   )ra   rL   r7  r:  s       rW   r  z5EthModuleTest.test_eth_get_code_with_block_identifierh  sR     vv$$rvv7J7J  
 $)))4y1}}rY   c                    |j                   j                  d      j                  d|i      }|j                  j	                  |      }t        |      sJ |d   }t        |      dkD  sJ |d   d   J t        |d   d         sJ t        |d   d   d         dk(  sJ t        |d         dk\  sJ |d   |d<   |d   |d	<   |j                  j                  |       y r  r$  )ra   rL   r  r5  rw   r'  r(  s          rW   r)  z)EthModuleTest.test_eth_create_access_listq  s    %%66q9KK67

 66,,S1x   |,;!###1~i(444";q>)#<===;q>-034:::8I&'1,,, %\2Li(E
 	$rY   c                    |j                   j                  |d      }t        |      sJ t        |      dk(  sJ |j                   j                  |t	        d            }||k(  sJ |j                   j                  |d      }||k(  sJ |j                   j                  |d      }||k(  sJ |j                   j                  |d      }||k7  sJ y r  r  )ra   rL   r  r   r  r  r  r  s           rW   test_eth_signzEthModuleTest.test_eth_sign  s     FFKK-4Y   
	 	"""9~,,, &&++-Z  
 )###&&++-T
 )###FFKK-8
	 I%%%-4T $ 
 	)))rY   c                     t        |d|i      5  |j                  j                  dd      }t        |      sJ t	        |      dk(  sJ 	 d d d        y # 1 sw Y   y xY wr  )r   r_   r  r   r   )ra   rL   r  r   s       rW   test_eth_sign_ens_namesz%EthModuleTest.test_eth_sign_ens_names  sn     $&GH
 	1 #*O $ I I&&&y>[000	1 	1 	1s   ;AAskip_if_testrpcc                     d} ||       t        |j                  j                  |t        j                  |                  }t        |      dk(  sJ y r   r   )ra   rL   r  r>  r   r   s         rW   r   z&EthModuleTest.test_eth_sign_typed_data  sT    &N 	FF""14::>N3O
	
 9~,,,rY   c                      ||       d}t        j                  t        d      5  |j                  j	                  |t        j                  |             d d d        y # 1 sw Y   y xY wr   r   )ra   rL   r  r>  r   s        rW   r   z.EthModuleTest.test_invalid_eth_sign_typed_data  sa     	&!N ]]Q
 	 FF""14::>S3T		 	 	s   0AA(keyfile_account_addressc                    ||t        d      d|j                  j                  t        d      d}|j                  j	                  |      }|j                  j
                  j                  |d         }||k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ |d   d	   |d	   k(  sJ |d   d
   |d
   k(  sJ |d   d   |d   k(  sJ y r   r   ra   rL   rA  ru   r   r   s         rW    test_eth_sign_transaction_legacyz.EthModuleTest.test_eth_sign_transaction_legacy(  s     ,)V((1X 

 ((4FFNN>>ve}M&*;;;;d|D!Z%5555d|G$
7(;;;;d|E"j&7777d|J':j+AAAAd|G$
7(;;;;rY   c           	         ||t        d      d|j                  dd      |j                  dd      t        d      d}|j                  j	                  |      }|j                  j
                  j                  |d         }||k(  sJ |d   d	   |d	   k(  sJ |d   d
   |d
   k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ |d   d   |d   k(  sJ y r   r   rC  s         rW   test_eth_sign_transactionz'EthModuleTest.test_eth_sign_transaction<  s,    ,)VIIa0$&IIa$81X 

 ((4FFNN>>ve}M&*;;;;d|D!Z%5555d|G$
7(;;;;d|E"j&7777d|N+z./IIII4L/0J?U4VV	
Vd|G$
7(;;;;rY   c                 @   ||t        d      dt        |j                  dd            t        |j                  dd            t        d      d}|j                  j                  |      }|j                  j                  j                  |d         }||k(  sJ |d   d	   |d	   k(  sJ |d   d
   |d
   k(  sJ |d   d   |d   k(  sJ |d   d   t        t        |d         d      k(  sJ |d   d   t        t        |d         d      k(  sJ |d   d   |d   k(  sJ y r   r   rC  s         rW   "test_eth_sign_transaction_hex_feesz0EthModuleTest.test_eth_sign_transaction_hex_feesT  sX    ,)V		!V 45$'		!V(<$=1X 

 ((4FFNN>>ve}M&*;;;;d|D!Z%5555d|G$
7(;;;;d|E"j&7777d|N+s3z.7Q3RTV/WWWWd|23s
123R8
 
 	
 
 d|G$
7(;;;;rY   c           
         t        |d|i      5  ddt        d      d|j                  dd      |j                  dd      t        d      d}|j                  j                  |      }|j                  j                  j                  |d         }||k(  sJ |d	   d
   |k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ |d	   d   |d   k(  sJ 	 d d d        y # 1 sw Y   y xY wr   r   rC  s         rW   #test_eth_sign_transaction_ens_namesz1EthModuleTest.test_eth_sign_transaction_ens_namesl  sY    2 68OPQ 	@.,Q "		!V 4(*		!V(<q$J VV,,Z8F " B B6%= Q*.????$<%)@@@@$<(Jw,????$<&*U*;;;;$</:n3MMMMt344566 $<(Jw,????+	@ 	@ 	@s   C$C==Dc           
         |j                         }||t        d      d|j                  dd      |j                  dd      d}t        j                  t
              5  t        t        t        |fi d|i      }|j                  j                  |       d d d        t        j                  t
              5  t        t        t        |fi d|i      }|j                  j                  |       d d d        y # 1 sw Y   cxY w# 1 sw Y   y xY w)Nrj   rk   r|   r{   r   rm   rn   )r3  r@   r~   r   r   r)   r
   r?   dictr_   rr   )ra   rL   rA  non_checksum_addrru   invalid_paramss         rW   0test_eth_send_transaction_addr_checksum_requiredz>EthModuleTest.test_eth_send_transaction_addr_checksum_required  s     499;+)VIIa0$&IIa$8 

 ]]>* 	4!$zIf6G-HIN FF##N3		4 ]]>* 	4!$zGd4E-FGN FF##N3		4 	4	4 	4	4 	4s   8C658D6C?Dc                 |   ||t        d      d|j                  dd      d}|j                  j                  |      }|j                  j	                  |      }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d   dk(  sJ |d	   |d	   k(  sJ y )
Nrj   rk   r{   rl   rm   rn   ro   rp   rq   r   ra   rL   r  ru   rv   rw   s         rW   rx   z.EthModuleTest.test_eth_send_transaction_legacy  s     63V		6 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""":*Z"8888rY   c           	         ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |      }|j                  j	                  |      }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d	   dk(  sJ |d
   |d
   k(  sJ |d   |d   k(  sJ |d   |d
   k  sJ y r   r   rQ  s         rW   r   z'EthModuleTest.test_eth_send_transaction  s    63VIIa0$&IIa$8 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""">"j&@@@@)*j9O.PPPP:#n"5555rY   c                    |j                  dd      }t        |j                  j                  d      d   |z         }||t        d      d||t	        |j                  j                  |d            d}|j                  j                  |      }|j                  j                  |      }t        |d	   t        t        |d	               sJ t        |d
   t        t        |d
               sJ |d   dk(  sJ |d   dk(  sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   |d   k(  sJ t        |d         sJ t        |d         sJ y )NgX9v?r{   r   rd  rj   rk   r  r   rm   rn   ro   rp   r   r   r   rq   )r~   r@   r_   r   r:   r  rr   rs   r   r
   r   r   )ra   rL   rA  max_priority_fee_per_gasmax_fee_per_gasru   rv   rw   s           rW   $test_eth_send_transaction_with_noncez2EthModuleTest.test_eth_send_transaction_with_nonce  st    $&99UF#; FFX&7:RR
 ,)V+$<,,-DiP
 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""">"j&@@@@)*j9O.PPPP7|z'2222#j/****^4555rY   c                    ||t        d      dd}|j                  j                  |      }|j                  j                  |      }t	        |d   t        t        |d               sJ t	        |d   t        t        |d               sJ |d   dk(  sJ |d   dk(  sJ t        |d         sJ t        |d	         sJ |d
   |d	   k  sJ y r   r   rQ  s         rW   r   z4EthModuleTest.test_eth_send_transaction_default_fees  s     63V	 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU"""#45666#n-...:#n"5555rY   c                    ||t        d      dt        d      t        d      d}|j                  j                  |      }|j                  j	                  |      }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d	   dk(  sJ |d
   dk(  sJ |d   dk(  sJ y r   r   rQ  s         rW   r   z0EthModuleTest.test_eth_send_transaction_hex_fees  s     63V,$'	N 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU""">"k111)*i777rY   c                 f   ||t        d      t        d      t        d      d}|j                  j                  |      }|j                  j                  |      }t	        |d   t        t        |d               sJ t	        |d   t        t        |d               sJ |d   dk(  sJ |d   d	k(  sJ y r   r   rQ  s         rW   r   z.EthModuleTest.test_eth_send_transaction_no_gas  s     63V,$'	N 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zV###rY   c           	          ||t        d      dt        d      t        d      t        d      d}t        j                  t              5  |j                  j                  |       d d d        y # 1 sw Y   y xY wr   r   ra   rL   r  ru   s       rW   r   z6EthModuleTest.test_eth_send_transaction_with_gas_price%  sg     63VA,$'	N 

 ]]23 	0FF##J/	0 	0 	0s   A--A6c                     ||t        d      dt        d      d}t        j                  t        d      5  |j                  j                  |       d d d        y # 1 sw Y   y xY wr   r   r[  s       rW   r   z7EthModuleTest.test_eth_send_transaction_no_priority_fee4  s`     63V, 

 ]]&L
 	0 FF##J/	0 	0 	0s   AA$c                    |j                  dd      }||t        d      d|d}|j                  j                  |      }|j                  j	                  |      }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d   dk(  sJ |d	   dk(  sJ t        |d
         sJ |d
   |k(  sJ t        |d         sJ y )Nr|   r{   rj   rk   r   rm   rn   ro   rp   r   r   )	r~   r@   r_   rr   rs   r   r
   r   r   )ra   rL   r  rT  ru   rv   rw   s          rW   r   z2EthModuleTest.test_eth_send_transaction_no_max_feeC  s     $&99Q#7 53V$< 

 66**:6ff$$X.s6{D*VBT,UVVVs4y$
4@P*QRRR7|q   5zU"""#45666)*.FFFF#n-...rY   c                     ||t        d      dt        d      t        d      d}t        j                  t        d      5  |j                  j                  |       d d d        y # 1 sw Y   y xY wr   r   r[  s       rW   r   z=EthModuleTest.test_eth_send_transaction_max_fee_less_than_tipY  sf     63V	N$'	N 

 ]]&T
 	0 FF##J/	0 	0 	0s    A%%A.c           	      N   d}|j                   j                  }||t        d      t        d      |j                  dd      |j                  dd      |d}t	        j
                  t        d| d| 	      5  |j                   j                  |       d d d        y # 1 sw Y   y xY wr   r   )ra   rL   r  r   r   ru   s         rW   r   z:EthModuleTest.test_validation_middleware_chain_id_mismatchi  s     $&&// 63Vu:IIa0$&IIa$8% 

 ]]6~6F G,,;+<>
 	0
 FF##J/	0 	0 	0s   6BB$rY  rZ  r[  r\  r]  c                     j                  dd      }||t        d      d|d}|t        |d|      }dddt        d	t        ffd
}j                  j                  |       j                  j                  |      }j                  j                  |      }j                  j                  d      }	|
|d   |k(  sJ d|	d   z  |z   sJ |d   |k(  sJ |d   |d   k  sJ j                  j                  d        y )Nrj   r{   rk   r   r   rQ  rK   rR  rO   c                 (    j                  dd      S ra  rb  rQ  rR  rL   s     rW   rJ  zcEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn.<locals>.gas_price_strategy      99Q''rY   r   r|   rd  r   rq   re  )
ra   rL   r  rY  rf  ru   rJ  rv   rw   rg  s
    `        rW   rh  zGEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn  s1    99Q/53V$4 

 z>7CJ	(F 	(( 	(s 	( 	%%&8966**:6ff$$X.vv''1 " 7*	
F\/225EE	
F )*.>>>>:#n"5555
%%d+rY   c                 d   ||t        d      dt        d      d}dddt        dt         ffd	}j                  j                  |       t	        j
                  t        d
      5  j                  j                  |       d d d        j                  j                  d        y # 1 sw Y   %xY w)Nrj   rk   r   r   rQ  rK   rR  rO   c                 (    j                  dd      S ra  rb  rb  s     rW   rJ  zjEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn_no_tip.<locals>.gas_price_strategy  rc  rY   r   r   rk  )ra   rL   r  ru   rJ  s    `   rW   rl  zNEthModuleTest.test_gas_price_from_strategy_bypassed_for_dynamic_fee_txn_no_tip  s     63V
O 

	(F 	(( 	(s 	( 	%%&89]]&L
 	0 FF##J/	0
 	%%d+	0 	0s   &B&&B/c                 ^   ||t        d      dd}|j                  dd      dddt        d	t        ffd
}|j                  j                  |       |j                  j                  |      }|j                  j                  |      }|d   k(  sJ |j                  j                  d        y )Nrj   rk   r   r|   r{   rQ  rK   rR  rO   c                     t              S rF  rT  rU  s     rW   rJ  zKEthModuleTest.test_gas_price_strategy_hex_value.<locals>.gas_price_strategy  rV  rY   rq   rW  )ra   rL   r  ru   rJ  rv   rw   rI  s          @rW   !test_gas_price_strategy_hex_valuez/EthModuleTest.test_gas_price_strategy_hex_value  s     63V	 

 ))Av.	(F 	(( 	(s 	( 	%%&8966**:6ff$$X.:/111
%%d+rY   c                    ||t        d      d|j                  dd      d}|j                  j                  |      }|j                  dd      |d<   |j                  j	                  ||      }|j                  j                  |      }t        |d   t        t        |d               sJ t        |d   t        t        |d               sJ |d	   dk(  sJ |d
   dk(  sJ |d   |d   k(  sJ y r  r  )ra   rL   r  ru   rv   r  r  s          rW   #test_eth_replace_transaction_legacyz1EthModuleTest.test_eth_replace_transaction_legacy  s    63V		6 

 66**:6!#1f!5
:6655h
Kff,,-=>oz&7I!J
 	
 
 tOZ5EF
 	
 
 7#q(((5!U***:&*Z*@@@@rY   c           	          |j                  dd      }|j                  dd      }||t        d      d||j                  dd      d}|j                  j                  |      }||d<   ||d<   |j                  j	                  ||      }|j                  j                  |      }t        |d	   t        t        |d	               sJ t        |d
   t        t        |d
               sJ |d   dk(  sJ |d   dk(  sJ |d   |k(  sJ |d   |k(  sJ y r  r  )	ra   rL   r  rI  r  ru   rv   r  r  s	            rW   test_eth_replace_transactionz*EthModuleTest.test_eth_replace_transaction  sH    ))Av.IIa0 63V+$&IIa$8 

 66**:6%6
>"-<
)*6655h
Kff,,-=>oz&7I!J
 	
 
 tOZ5EF
 	
 
 7#q(((5!U***>*.????12oEEErY   c           	      n   ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |      }|j                  dd      }||d<   ||d<   t	        j
                  t        d	
      5  |j                  j                  ||       d d d        y # 1 sw Y   y xY wr  r  )ra   rL   r  ru   rv   r  s         rW   (test_eth_replace_transaction_underpricedz6EthModuleTest.test_eth_replace_transaction_underpriced  s     63VIIa0$&IIa$8 

 66**:6))Av.%4
>"-<
)*]]</TU 	=FF&&x<	= 	= 	=s   B++B4c           	         ||t        d      d|j                  dd      |j                  dd      d}t        j                  t              5  |j
                  j                  t        d      |       d d d        y # 1 sw Y   y xY wr  r  r[  s       rW   5test_eth_replace_transaction_non_existing_transactionzCEthModuleTest.test_eth_replace_transaction_non_existing_transaction)  s}     63VIIa0$&IIa$8 

 ]]./ 	FF&&X 		 	 	s   &A;;Bc           	         ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |      }|j                  j	                  |d       |j                  dd      |d	<   |j                  dd      |d
<   t        j                  t        d      5  |j                  j                  ||       d d d        y # 1 sw Y   y xY wr  r  ra   rL   r  ru   rv   s        rW   *test_eth_replace_transaction_already_minedz8EthModuleTest.test_eth_replace_transaction_already_mined<  s     63VIIa0$&IIa$8 

 66**:6
++Hb+A%'YYq&%9
>"-/YYq&-A
)*]]>1QR 	=FF&&x<	= 	= 	=s   0CCc           	         ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |      }|j                  j	                  |      }|j                  dd      |d<   |j                  dd      |d<   t        |d	   dz         |d	<   t        j                  t              5  |j                  j                  ||       d d d        y # 1 sw Y   y xY wr  r  )ra   rL   rA  ru   rv   rw   s         rW   ,test_eth_replace_transaction_incorrect_noncez:EthModuleTest.test_eth_replace_transaction_incorrect_nonceO  s     ,)VIIa0$&IIa$8 

 66**:6ff$$X.%'YYq&%9
>"-/YYq&-A
)*#CL1$45
7]]>* 	=FF&&x<	= 	= 	=s    C&&C/c                 :   ||t        d      d|j                  dd      d}|j                  j                  |      }|j                  dd      |d<   t	        j
                  t              5  |j                  j                  ||       d d d        y # 1 sw Y   y xY wr  r  rr  s        rW   .test_eth_replace_transaction_gas_price_too_lowz<EthModuleTest.test_eth_replace_transaction_gas_price_too_lowc  s     63V		!V, 

 66**:6!#1f!5
:]]>* 	=FF&&x<	= 	= 	=s   +BBc                 P   |j                  dd      }||t        d      d|d}|j                  j                  |      }|j	                  d       |j                  j                  ||      }|j                  j                  |      }|d   t        j                  |dz        k(  sJ y r  r  )ra   rL   rA  r`   ru   rv   r  r  s           rW   9test_eth_replace_transaction_gas_price_defaulting_minimumzGEthModuleTest.test_eth_replace_transaction_gas_price_defaulting_minimums  s     IIa(	 ,)V! 

 66**:6z"6655h
Kff,,-=>:&$))+
 
 	
 
rY   c                    ||t        d      d|j                  dd      d}|j                  j                  |      }|j                  dd      dddt        d	t         ffd
}|j                  j                  |       |j                  d       |j                  j                  ||      }|j                  j                  |      }|d   k(  sJ |j                  j                  d        y )Nrj   rk   r{   rl   r|   rL   rK   rw   rO   c                     S rF  rG  rH  s     rW   r  zrEthModuleTest.test_eth_replace_transaction_gas_price_defaulting_strategy_higher.<locals>.higher_gas_price_strategy  rK  rY   rq   r  )	ra   rL   rA  ru   rv   r  r  r  rI  s	           @rW   Atest_eth_replace_transaction_gas_price_defaulting_strategy_higherzOEthModuleTest.test_eth_replace_transaction_gas_price_defaulting_strategy_higher  s     ,)V		!V, 

 66**:6))Av.	#& 	#x 	#C 	# 	%%&?@z"6655h
Kff,,-=>
#6	
6
%%d+rY   c                    |j                  dd      }||t        d      d|d}|j                  j                  |      }dddt        d	t        fd
}|j                  j                  |       |j                  d       |j                  j                  ||      }|j                  j                  |      }|d   t        j                  |dz        k(  sJ |j                  j                  d        y )Nr|   r{   rj   rk   rl   rL   rK   rw   rO   c                 &    | j                  dd      S r  rb  )rL   rw   s     rW   r  zpEthModuleTest.test_eth_replace_transaction_gas_price_defaulting_strategy_lower.<locals>.lower_gas_price_strategy  s    99Q''rY   rq   r  r  )	ra   rL   rA  r`   ru   rv   r  r  r  s	            rW   @test_eth_replace_transaction_gas_price_defaulting_strategy_lowerzNEthModuleTest.test_eth_replace_transaction_gas_price_defaulting_strategy_lower  s     IIa(	+)V! 

 66**:6	( 	(h 	(3 	( 	%%&>?z"6655h
Kff,,-=>:&$))I4E*FFFF
%%d+rY   c                    ||t        d      d|j                  dd      d}|j                  j                  |      }|j                  j	                  |t        t         |d   dz        t        d            }|j                  j                  |      }t        |d   t        t        |d               sJ t        |d	   t        t        |d	               sJ |d
   dk(  sJ |d   dk(  sJ |d   t        t        |d         dz  k(  sJ y rz   r}   ra   rL   rA  ru   rv   r   r   s          rW   r   z0EthModuleTest.test_eth_modify_transaction_legacy  s.    ,)V		6 

 66**:6FF55S*Z*@1*D EcRSf 6 
 vv--.?@ $
68J"K
 	
 
 _j6F G
 	
 
 G$)))E"e+++J'4Z
5K+Lq+PPPPrY   c           
         ||t        d      d|j                  dd      |j                  dd      d}|j                  j                  |      }|j                  j	                  |t        d      t        t         |d   dz        t        t         |d   dz              }|j                  j                  |      }t        |d	   t        t        |d	               sJ t        |d
   t        t        |d
               sJ |d   dk(  sJ |d   dk(  sJ |d   t        t         |d         dz  k(  sJ |d   t        t         |d         dz  k(  sJ y r   r   r  s          rW   r   z)EthModuleTest.test_eth_modify_transaction  s    ,)V$&IIa$8IIa0 

 66**:6FF55a&"&sJ7M,NQR,R"SsJ~$>$BC	 6 
 vv--.?@ $
68J"K
 	
 
 _j6F G
 	
 
 G$)))E"e+++/0C$:;<q@A	
A N+tCN9S/TWX/XXXXrY   r  c           	         |j                   j                  j                  |      }d|j                  |j                  t	        d      d|j                   j                  |j                  d      dd}|j                  |      }|j                   j                  |j                        }|t        |j                        k(  sJ y r  r  )ra   rL   r  r  rw   r  rv   s          rW   test_eth_send_raw_transactionz+EthModuleTest.test_eth_send_raw_transaction  s     &&..112FG&#++!))VVV11/2I2I9U
 !11#666..v/E/EF8FKK0000rY   c                    |j                   j                  j                  |      }|j                  |j                  t	        d      dd}|j
                  j                  t        j                  |      dd       |j                   j                  |      }t        |t              sJ |j
                  j                  d       y r  r  )ra   rL   r  r  rw   rv   s         rW   !test_sign_and_send_raw_middlewarez/EthModuleTest.test_sign_and_send_raw_middleware  s     &&..112FG#++!))V	
 	""+11/BIUV 	# 	
 66**3/(H--- 	""9-rY   c           
         |j                   j                  j                  |      }|j                   j                  }|j                   j	                  |j
                        }||j
                  |dz   d}|j                  |      }|j                  j                         j                         }	|j                  d|	dz   g      }
||j
                  t        d      d|t        d      t        d      |
|gd	}|j                  |      }|j                   j                  |j                         |j                   j                  |j                         }|j                   j#                  |j                          |j                   j%                  |j
                        }|j'                         d	|j
                  d
d  j)                          k(  sJ |j                   j+                  |j
                  |j,                        }|j                  j                         j                         |	k(  sJ |j                  j                         j                         |	dz   k(  sJ t/        |d         dk(  sJ |d   d   }|d   |k(  sJ |d   |j
                  k(  sJ |d   |dz   k(  sJ t1        |d   t2              sJ t1        |d   t4              sJ t1        |d   t4              sJ |d|dz   d}|j                  |      }t7        ||j
                  |g|d
z   d      }|j                   j9                  |      }|j                   j#                  |       |j                   j%                  |j
                        }|t5        d      k(  sJ y )Nrj   r  r  r  r   r  r   r  r  r|   r   r  r   rQ   r   r#  r$  r%  r&  r   r'  r   )r_   r   r  r   r  rQ   r+  r,  r-  r.  r/  r@   r   r	  r
  rs   r  r0  r1  r2  r3  r4  rU   r   r  r   r   r   rr   )ra   rL   r  r5  r  r   r   r5  r6  r7  r  rw   r  r9  r:  r;  r=  r>  r?  r@  rA  rB  s                         rW   ?test_sign_authorization_send_raw_and_send_set_code_transactionszMEthModuleTest.test_sign_authorization_send_raw_and_send_set_code_transactions!  sL    &&..112FG66??,,_-D-DE  $,,QY

 &88> %..668==?''(:\D=P<QR!))V$'JJ"-

 !11#6
##F$:$:;''4
++FKK8vv667~~Xm.C.CAB.G.M.M.O-P#QQQQFFOO#++1B1B $ 
	 &&..0557<GGG""**,113|d7JJJJ6-./1444-.q1	"h...	"m&;&;;;; EAI---(9-s333(3-222(3-222  )QY


 ,>>zJ'//&7%8
 //?
++M:VV___%<%<=
Xd^+++rY   c                    |j                  dd|j                  j                  d   |j                  d      }|j                  j	                  |      }t        |      sJ |j                  j                  dg|      \  }|dk(  sJ y )Nr/  r0  r   r3  r4  r7  r8  r:  r_   r  rQ   r.  r   r;  r<  ra   rL   r5  ru   r=  r   s         rW   r>  zEthModuleTest.test_eth_calln  s~    "77#(!#!3=;P;PQ 8 


 ffkk*-%%%HHOOYK=	||rY   revert_contractc           	      \   |j                  d|j                  j                  d   |j                  d      }|j                  j	                  |      }|j
                  j                  dg|      \  }|du sJ t        d      }|j                  j	                  |d|j                  d	|ii      }|j
                  j                  dg|      \  }|d
u sJ |j                  j	                  |d|j                  d	t        |      ii      }|j
                  j                  dg|      \  }|d
u sJ y )NrA  r   r3  rB  rC  TrD  r   r:  FrR   )	r:  r_   r  rQ   r.  r;  r<  r   r   )	ra   rL   r  ru   r=  r   rE  rF  rG  s	            rW   rH  z.EthModuleTest.test_eth_call_with_override_codey  s.    %99#3!#!3?;R;RS : 

 ffkk*-HHOOVHk:	~~  U	
 ffkk?#:#:V]<S"T
 HHOOVHk:	 FFKK$$vx}/M&NO

 ((//6(4EFu$$$rY   rt  rj   r   ru  rv  ry  rz  r{  c                     |j                   j                  d   |j                  d}|j                   j                  |d|j                  |i       y )Nr   r3  r   )r_   r  rQ   r.  ra   rL   r5  rt  ru   s        rW   rJ  z:EthModuleTest.test_eth_call_with_override_param_type_check  sB    2 )+(:-BWBWX
 	J=+@+@&*IJrY   c                    |j                  dd|j                  j                  d   |j                  d      }|j                  j	                  |      }t        |      sJ |j                  j                  dg|      \  }|dk(  sJ y rL  r  r  s         rW   rM  z)EthModuleTest.test_eth_call_with_0_result  s     #77#(!#!3=;P;PQ 8 


 ffkk*-%%%HHOOYK=	{{rY   c                    |j                  d||j                  d      }d}t        j                  t        d      5 }|j
                  j                  |       d d d        j                  j                  |k(  sJ y # 1 sw Y   %xY w)NrO  r3  rB  0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001b46756e6374696f6e20686173206265656e2072657665727465642e0000000000rP  r   )	r:  rQ   r   r   r'   r_   r.  ro   r  )ra   rL   r  rA  ru   r  r  s          rW   rR  z+EthModuleTest.test_eth_call_revert_with_msg  s     %99#6/%-- : 

 \]]&V
 	$FFKK
#	$ }}!!T)))		$ 	$s   A>>Bc                     t        j                  t        d      5  |j                  d||j                  d      }|j
                  j                  |       d d d        y # 1 sw Y   y xY wrT  rV  ra   rL   r  rA  ru   s        rW   rW  z.EthModuleTest.test_eth_call_revert_without_msg  sd     ]]-5IJ 	$(=='=3)11 > J FFKK
#	$ 	$ 	$   <A!!A*c                 8   |j                  ddg      }|j                  d||j                  d      }t        j                  t
        |      5 }|j                  j                  |       d d d        j                  j                  |k(  sJ y # 1 sw Y   %xY wrY  
r/  r:  rQ   r   r   r&   r_   r.  ro   r  ra   rL   r  rA  r  ru   r  s          rW   *test_eth_call_custom_error_revert_with_msgz8EthModuleTest.test_eth_call_custom_error_revert_with_msg  s     ))#<*+ * 
 %99#;/%-- : 

 ]].d; 	$wFFKK
#	$}}!!T)))	$ 	$   BBc                 4   |j                  d      }|j                  d||j                  d      }t        j                  t
        |      5 }|j                  j                  |       d d d        j                  j                  |k(  sJ y # 1 sw Y   %xY wra  r  r  s          rW   -test_eth_call_custom_error_revert_without_msgz;EthModuleTest.test_eth_call_custom_error_revert_without_msg  s     )))P$99#>/%-- : 

 ]].d; 	$wFFKK
#	$}}!!T)))	$ 	$   BBc           
         |j                   j                  dt        d      iddt        d      iiddt        d      t        d      dgdgddd	d
      }t        |      dk(  sJ |d   }|j	                  d      dk(  sJ |j	                  d      }|J t        |      dk(  sJ |d   t        fddD              sJ d   dk(  sJ d   t        dd      k(  sJ y )Nrd  r(  r  rw  r  r  r  Tr  r   rj   r   r  c              3   &   K   | ]  }|v  
 y wrF  rG  r  s     rW   r  z5EthModuleTest.test_eth_simulate_v1.<locals>.<genexpr>5  r  r  r  r  r#  r  r   r  )ra   rL   r  r   r  r  s        @rW   r  z"EthModuleTest.test_eth_simulate_v1  s8   &&,,
 ,SW+ I )3y>K+ )U&R03B8;B	"$( #"&-0 3
8 ?#q((( #zz/*b000zz'*'''< A%%%!!_
 
)T
 
 	
 
 (#q((()$Hb(9999rY   re  rf  rg  rh  r   ri  rj  rk  rl  rm  rn  ro  panic_errors_contractrq  c                     t        |j                  d|       }t        |   }t        j                  t
        t        j                  |            5   || j                          d d d        y # 1 sw Y   y xY wrs  ru  )ra   rL   r  rq  rt  ry  rz  s          rW   r{  z(EthModuleTest.test_contract_panic_errors;  sj    * !++}%
 &k2	]]-RYYy5IJ 	#FO  "	# 	# 	#s   A..A7rN   r}  rG   c                 (   t        |j                        j                         }t        |d| dt         dt
               |j                  j                  t              j                         }|j                  j                  dg|      d   dk(  sJ y r  r$   rQ   r3  r"   r  r  r,  r  r.  r;  r<  ra   rL   rN   rA  r}  r  r'  s          rW   r  z+EthModuleTest.test_eth_call_offchain_lookupY  s     '6$,,'

%' 	$ 	.!9:U9VVWXqWrrwx/	

 ,55HH%

$& 	 xxz84Q78CCCrY   c                 6   t         t        ||      z   t        z   }t        j                  t
              5 }|j                  j                  t              j                  d       d d d        j                  j                  |k(  sJ t        j                  t
              5 }|j                  d      j                  t               d d d        j                  j                  |k(  sJ d|j                  _        t        j                  t
              5 }|j                  j                  t              j                          d d d        j                  j                  |k(  sJ d|j                  _        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   OxY wr  )r  rX   r  r   r   r-   r,  r  r  r.  ro   r  r  r  r  )ra   rL   rN   r  r  r  r  s          rW   r  zMEthModuleTest.test_eth_call_offchain_lookup_raises_when_ccip_read_is_disabledm  sX    ':2?WXY)* 	 ]]>* 	,a$..AA)dUd+	, ww||{*** ]]>* 	g$++e+DWW)	 }}!![000 05,]]>* 	h$..AA)df	 ~~""k111/3,-	, 	,	 		 	s#   0E6 &F.F6F FFc                 p   t        |j                        j                         }t        |d| dt         dt
               d|j                  _        |j                  j                  t              j                  d      }|j                  j                  dg|      d	   d
k(  sJ d|j                  _        y r  )r$   rQ   r3  r"   r  r  r  r  r,  r  r.  r;  r<  r  s          rW   r  zMEthModuleTest.test_eth_call_offchain_lookup_call_flag_overrides_provider_flag  s     '6$,,'

%' 	$ 	.!9:U9VVWXqWrrwx/	
 05,+55HH%

$$
& 	 xxz84Q78CCC/3,rY   r  r  c                 .   |j                   j                  }||j                   _        t        j                  t        d      5  |j
                  j                  t              j                          d d d        ||j                   _        y # 1 sw Y   xY wr  )	r  r  r   r   r4   r,  r  r  r.  )ra   rL   rN   r  r  s        rW   r  zREthModuleTest.test_eth_call_offchain_lookup_raises_if_max_redirects_is_less_than_4  sp     !# C C.;+]]>> 	$..AA)df	
 /D+	 	s   .BBc                 @   t        |j                        j                         }t        |d| dt         dt
        d       t        j                  t        d      5  |j                  j                  t              j                          d d d        y # 1 sw Y   y xY wr  )r$   rQ   r3  r"   r  r  r   r   r3   r,  r  r.  ra   rL   rN   rA  r}  r  s         rW   r  zaEthModuleTest.test_eth_call_offchain_lookup_raises_for_improperly_formatted_rest_request_response  s     '6$,,'

%' 	$ 	.!9:U9VVWXqWrrwx/&		
 ]].6LM 	$..AA)df	 	 	s   .BBr  r  c           	      ^   t        |j                        j                         }t        |d| dt         d|t
               t        |dddt
        |t               |j                  j                  t              j                         }|j                  j                  d	g|      d
   dk(  sJ y r  r  )ra   rL   rN   rA  r}  r  r  r'  s           rW   r  zbEthModuleTest.test_eth_call_offchain_lookup_tries_next_url_for_non_4xx_error_status_and_tests_POST  s     '6$,,'

%' 	$ 	.!9:U9VVWXqWrrwx8/		
 	.8"/..	
 ,55HH%

$& 	 xxz84Q78CCCrY   c                 T   t        |j                        j                         }t        |d| dt         dt        dd      t               t        j                  t        d      5  |j                  j                  t              j                          d d d        y # 1 sw Y   y xY wr  )r$   rQ   r3  r"   r  r   r  r   r   r  r,  r  r.  r  s         rW   r  zVEthModuleTest.test_eth_call_offchain_lookup_calls_raise_for_status_for_4xx_status_code  s     '6$,,'

%' 	$ 	.!9:U9VVWXqWrrwx&sC0/		
 ]]9,KL 	$..AA)df	 	 	s   '.BB'c                     t        j                  t        d      5  |j                  j	                  t
              j                          d d d        y # 1 sw Y   y xY wr  )r   r   r+   r,  r  r  r.  )ra   rN   s     rW   r  zNEthModuleTest.test_eth_call_offchain_lookup_raises_when_all_supplied_urls_fail
  sK    
 ]]"*T
 	 %..AA)df	 	 	s   .AAc                    t        |j                        j                         }t        |d| d       t	        j
                  t        d      5  |j                         j                          d d d        y # 1 sw Y   y xY wr  )	r$   rQ   r3  r"   r   r   r/   r  r  )ra   rN   r}  r  s       rW   r  zTEthModuleTest.test_eth_call_continuous_offchain_lookup_raises_with_too_many_requests  s|    
 '6$,,'

%' 	$ 	.!9:U9VV^_	
 ]]?2PQ 	I$++-FFH	I 	I 	Is   A88Bc                     t        j                  t        d      5  |j                  d||j                  d      }|j
                  j                  |       d d d        y # 1 sw Y   y xY w)NrP  r   rO  r3  rB  r   r   r'   r:  rQ   r_   rq  r  s        rW   %test_eth_estimate_gas_revert_with_msgz3EthModuleTest.test_eth_estimate_gas_revert_with_msg%  sj     ]]&V
 
	, )==':3)11 > J FF
+
	, 
	, 
	,r  c                     t        j                  t        d      5  |j                  d||j                  d      }|j
                  j                  |       d d d        y # 1 sw Y   y xY wrT  r  r  s        rW   (test_eth_estimate_gas_revert_without_msgz6EthModuleTest.test_eth_estimate_gas_revert_without_msg7  sf     ]]-5IJ 	,(=='=3)11 > J FF
+	, 	, 	,r  c                 8   |j                  ddg      }|j                  d||j                  d      }t        j                  t
        |      5 }|j                  j                  |       d d d        j                  j                  |k(  sJ y # 1 sw Y   %xY wrY  
r/  r:  rQ   r   r   r&   r_   rq  ro   r  r  s          rW   2test_eth_estimate_gas_custom_error_revert_with_msgz@EthModuleTest.test_eth_estimate_gas_custom_error_revert_with_msgG  s     ))#<*+ * 
 %99#;/%-- : 

 ]].d; 	,wFF
+	,}}!!T)))	, 	,r  c                 4   |j                  d      }|j                  d||j                  d      }t        j                  t
        |      5 }|j                  j                  |       d d d        j                  j                  |k(  sJ y # 1 sw Y   %xY wra  r  r  s          rW   5test_eth_estimate_gas_custom_error_revert_without_msgzCEthModuleTest.test_eth_estimate_gas_custom_error_revert_without_msg\  s     )))P$99#>/%-- : 

 ]].d; 	,wFF
+	,}}!!T)))	, 	,r  c                 |    |j                   j                  ||t        d      d      }t        |      sJ |dkD  sJ y rn  rp  ra   rL   r  rr  s       rW   rs  z#EthModuleTest.test_eth_estimate_gasn  sH     vv**97Q
 ,'''arY   c                 ~    |j                   j                  ||t        d      dd      }t        |      sJ |dkD  sJ y )Nrj   ro  r   r   rp  r  s       rW    test_eth_estimate_gas_with_blockz.EthModuleTest.test_eth_estimate_gas_with_block{  sM     vv**97Q
 
 ,'''arY   c                     d|j                   j                  d   i}|j                   j                  |d |j                  |i       y r~  r  r  s        rW   r  zBEthModuleTest.test_eth_estimate_gas_with_override_param_type_check  s>    2 !'(:;
 	J}/D/Df.MNrY   c                     |j                   j                  |d         }|d   |d   k(  sJ |d   |d   k(  sJ |d   |d   k(  sJ y )Nr  receiptsRoot	logsBloomr  ra   rL   r  r   s       rW   r  z%EthModuleTest.test_eth_getBlockByHash  sb      V!45V}F 3333^$N(CCCC[![%====rY   c                     t        j                  t              5  |j                  j	                  t
               d d d        y # 1 sw Y   y xY wrF  r  ra   rL   r  s      rW   r  z/EthModuleTest.test_eth_getBlockByHash_not_found  s7     ]]=) 	+FF\*	+ 	+ 	+    AAc                 H    |j                   j                  d      }|d   J y r  r  ra   rL   r   s      rW   r  z-EthModuleTest.test_eth_getBlockByHash_pending  s&      +V}$$$rY   c                 Z    |j                   j                  |d         }|d   |d   k(  sJ y r  r  r  s       rW   r  z4EthModuleTest.test_eth_getBlockByNumber_with_integer  s4       X!67X+h"7777rY   c                 H    |j                   j                  d      }|d   J y r  r  r  s      rW   r  z.EthModuleTest.test_eth_getBlockByNumber_latest  s&      *V}(((rY   c                     t        j                  t              5  |j                  j	                  t        d             d d d        y # 1 sw Y   y xY wr  r  r  s      rW   r  z1EthModuleTest.test_eth_getBlockByNumber_not_found  s<     ]]=) 	1FF[/0	1 	1 	1s   %AAc                     |j                   j                  }|j                   j                  d      }|d   |dz   k(  sJ y )Nr  r  rj   )r_   r  r   )ra   rL   r  current_block_numberr   s        rW   r  z/EthModuleTest.test_eth_getBlockByNumber_pending  s@      "vv22  +X"6"::::rY   c                     |j                   j                  t        d            }|j                   j                  d      }|d   dk(  sJ |d   |d   k(  sJ y r  r  )ra   rL   r  r  r   s        rW   r  z0EthModuleTest.test_eth_getBlockByNumber_earliest  sY     ((Q8  ,X!###V}f 5555rY   c                 l    |j                   j                  d      }|J t        |d   t              sJ y r  r  r  s       rW   r  z,EthModuleTest.test_eth_getBlockByNumber_safe  s8       (   %/3///rY   c                 l    |j                   j                  d      }|J t        |d   t              sJ y r  r  r  s       rW   r  z1EthModuleTest.test_eth_getBlockByNumber_finalized  s8       -   %/3///rY   c                     |j                   j                  |d   d      }t        t        |d   d         }|d   |d   d   k(  sJ y r  r  )ra   rL   r'  r   r  s        rW   +test_eth_getBlockByNumber_full_transactionsz9EthModuleTest.test_eth_getBlockByNumber_full_transactions  sR       !94@65#8#;<6"n^&DQ&GGGGrY   c                 d    |j                   j                  |d         }t        |t              sJ y r  r  ra   rL   r  r  s       rW   r  z,EthModuleTest.test_eth_getBlockReceipts_hash  s-     66,,[-@A(D)))rY   c                     t        j                  t              5  |j                  j	                  t
               d d d        y # 1 sw Y   y xY wrF  r  ra   rL   s     rW   r  z1EthModuleTest.test_eth_getBlockReceipts_not_found  s5    ]]=) 	4FF%%l3	4 	4 	4r  c                 d    |j                   j                  |d         }t        |t              sJ y r  r  r  s       rW   r  z4EthModuleTest.test_eth_getBlockReceipts_with_integer  s-     66,,[-BC(D)))rY   c                 ^    |j                   j                  d      }t        |t              sJ y r  r  r  s       rW   r  z,EthModuleTest.test_eth_getBlockReceipts_safe  s(     66,,V4(D)))rY   c                 ^    |j                   j                  d      }t        |t              sJ y r  r  r  s       rW   r  z1EthModuleTest.test_eth_getBlockReceipts_finalized  s(     66,,[9(D)))rY   r  c                 z    |j                   j                  |      }t        |      sJ |d   t        |      k(  sJ y r  )r_   rs   r   r   )ra   rL   r  r  s       rW   test_eth_getTransactionByHashz+EthModuleTest.test_eth_getTransactionByHash  s<    ff,,^<{###6"h~&>>>>rY   math_contract_deploy_txn_hashc                 x    |j                   j                  |      }t        |      sJ |d   J d|d          y )Nrn   zto field is )r_   rs   r   )ra   rL   r  r  s       rW   /test_eth_getTransactionByHash_contract_creationz=EthModuleTest.test_eth_getTransactionByHash_contract_creation  sJ     ff,,-JK{###4 (NLT9J8M*NN(rY   c                     |j                   j                  |d   d      }t        |      sJ |d   t        |      k(  sJ y rn  r_   get_transaction_by_blockr   r   ra   rL   r'  r  r  s        rW   *test_eth_getTransactionByBlockHashAndIndexz8EthModuleTest.test_eth_getTransactionByBlockHashAndIndex  sE     ff55nV6LaP{###6"h~&>>>>rY   c                     |j                   j                  |d   d      }t        |      sJ |d   t        |      k(  sJ y )Nr  r   r  r  r  s        rW   ,test_eth_getTransactionByBlockNumberAndIndexz:EthModuleTest.test_eth_getTransactionByBlockNumberAndIndex  sF     ff55nX6NPQR{###6"h~&>>>>rY   c                 L   |j                   j                  |      }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         sJ |d	   J t	        |d	         sJ |d
   }t        |t              sJ |dkD  sJ y r  r  ra   rL   r'  r  r  r  s         rW   &test_eth_get_transaction_receipt_minedz4EthModuleTest.test_eth_get_transaction_receipt_mined!  s     &&00@w}%)AAAA{#~f'====)*a///()Xn-EEEE"74=111v***"76?333%&9:-s333"Q&&&rY   c                 ,   |j                   j                  ||t        d      d|j                  dd      |j                  dd      d      }t	        j
                  t              5  |j                   j                  |       d d d        y # 1 sw Y   y xY wr  r  )ra   rL   r  rv   s       rW   (test_eth_get_transaction_receipt_unminedz6EthModuleTest.test_eth_get_transaction_receipt_unmined2  s     66**97Q "		!V 4(*		!V(<	
 ]]./ 	5FF**84	5 	5 	5s   %B

Bblock_with_txn_with_logr  c                    |j                   j                  |      }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         d	k(  sJ |d   d   }|d   |d   k(  sJ |d   |d   k(  sJ |d
   dk(  sJ t        |d   |j                        sJ |d   dk(  sJ |d   t        |      k(  sJ y r  )r_   r  r   r   r   r   rQ   ra   rL   r  r7  r  r  r  s          rW   /test_eth_get_transaction_receipt_with_log_entryz=EthModuleTest.test_eth_get_transaction_receipt_with_log_entryB  s;    &&001BCw}%)@)JJJJ{#'>v'FFFF)*a///()X6G-HHHH76?#q(((FOA&	'+B8+LLLL%)@)HHHH$)))y35E5M5MNNN+,111*+x8I/JJJJrY   c                 L   |j                   j                  |      }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         sJ |d	   J t	        |d	         sJ |d
   }t        |t              sJ |dkD  sJ y r  r  r  s         rW   +test_eth_wait_for_transaction_receipt_minedz9EthModuleTest.test_eth_wait_for_transaction_receipt_minedZ  s     &&55nEw}%)AAAA{#~f'====)*a///()Xn-EEEE"74=111v***"76?333%&9:-s333"Q&&&rY   c                 f   |j                   j                  ||t        d      d|j                  dd      |j                  dd      d      }d}t	        j
                  t              5 |j                   j                  ||       d d d        fdt        |      |fD        sJ y # 1 sw Y   "xY w)	Nrj   rk   r   r{   r   r  r)  c              3   8   K   | ]  }|t              v   y wrF  r  r  s     rW   r  zNEthModuleTest.test_eth_wait_for_transaction_receipt_unmined.<locals>.<genexpr>}  r  r  r  )ra   rL   r  rv   r*  r  s        @rW   -test_eth_wait_for_transaction_receipt_unminedz;EthModuleTest.test_eth_wait_for_transaction_receipt_unminedk  s     66**97Q "		!V 4(*		!V(<	
 ]]=) 	KXFF//'/J	K GT(^W,EFFF	K 	Ks   (B''B0c                    |j                   j                  |      }t        |      sJ |d   |d   k(  sJ |d   |d   k(  sJ |d   dk(  sJ |d   t        |      k(  sJ t	        |d         d	k(  sJ |d   d   }|d   |d   k(  sJ |d   |d   k(  sJ |d
   dk(  sJ t        |d   |j                        sJ |d   dk(  sJ |d   t        |      k(  sJ y r  r   r  s          rW   4test_eth_wait_for_transaction_receipt_with_log_entryzBEthModuleTest.test_eth_wait_for_transaction_receipt_with_log_entry  s;    &&556GHw}%)@)JJJJ{#'>v'FFFF)*a///()X6G-HHHH76?#q(((FOA&	'+B8+LLLL%)@)HHHH$)))y35E5M5MNNN+,111*+x8I/JJJJrY   c                 h   |j                   j                  i       }|j                   j                  |j                        }t	        |      sJ |rJ |j                   j                  |j                        }t	        |      sJ |rJ |j                   j                  |j                        }|du sJ y re   r  )ra   rL   r  r  r  r   s         rW   test_eth_new_filterz!EthModuleTest.test_eth_new_filter  s    r"&&++F,<,<=G$$${vv%%f&6&67D!!!x(()9)9:~~rY   c                 "   |j                   j                  d      }t        |j                        sJ |j                   j	                  |j                        }t        |      sJ |j                   j                  |j                        }|du sJ y r  r  ra   rL   r  r  r   s        rW   test_eth_new_block_filterz'EthModuleTest.test_eth_new_block_filter  sv    x())***&&++F,<,<=G$$$(()9)9:~~rY   c                 *   |j                   j                  d      }t        |j                        sJ |j                   j	                  |j                        }t        |      sJ |rJ |j                   j                  |j                        }|du sJ y r  r  r  s        rW   'test_eth_new_pending_transaction_filterz5EthModuleTest.test_eth_new_pending_transaction_filter  s~    y)))***&&++F,<,<=G$$${(()9)9:~~rY   c                 T   t        d      t        |d   dz
        d}|j                  j                  |      }t        |      dk(  sJ |d   t        |d   dz
        d}t	        j
                  t              5  |j                  j                  |       d d d        t        d      t        d}|j                  j                  |      }t        |      dk(  sJ t        d      t        t        gd}|j                  j                  |      }t        |      dk(  sJ y # 1 sw Y   xY wr&  r+  )ra   rL   r  r.  r   s        rW   test_eth_get_logs_without_logsz,EthModuleTest.test_eth_get_logs_without_logs  s    %Q"#:8#Dq#HI'
 /6{a 1:"#:8#Dq#HI
 ]]<( 	+FFOOM*	+ %Q&
 /6{a %Q'9
 /6{a+	+ 	+s   9DD'emitter_contract_addressc                     |d   |d   d}|j                   j                  |      }t        ||||       dt        d      i}|j                   j                  |      }t        ||||       t        d      |d}y r2  r3  ra   rL   r  r  r  r.  r   s          rW   test_eth_get_logs_with_logsz)EthModuleTest.test_eth_get_logs_with_logs  s     1:.x8'
 /+-EGX	
 Q
 /+-EGX	
 %Q/
rY   c                    t        d      d t        d      gd}|j                  j                  |      }t	        ||||       t        d      t        d      d gd}|j                  j                  |      }t	        ||||       y r7  r<  r  s          rW   &test_eth_get_logs_with_logs_topic_argsz4EthModuleTest.test_eth_get_logs_with_logs_topic_args  s     %QX'
 /+-EGX	
 %QX 	
 /+-EGX	
rY   c                 z    t        d      g dd}|j                  j                  |      }t        |      dk(  sJ y )Nr   )NNNr9  r?  )ra   rL   r.  r   s       rW   +test_eth_get_logs_with_logs_none_topic_argsz9EthModuleTest.test_eth_get_logs_with_logs_none_topic_args-  s;     %Q('

 /6{arY   c                    |j                   j                  d      }|d   }|d   }|j                  j                         j	                         }|j                  j                         j	                  d      }|j                  j                         j                  d|i      }	|j                   j                  |	      }
|j                  j                         j	                  |
d         }|j                  j                         j	                  |      }|j                  j                         j	                  |      }||dz
  k(  sJ ||cxk(  r|cxk(  r|k(  sJ  J y )Nr   r  r  r!  rm   r  rj   )r_   r   r,  r-  r.  r  transactr0  )ra   rL   r5  rA  current_block	block_num
block_hashdefault_call_resultlatest_call_resultr8  
tx_receipt post_state_block_num_call_resultblock_hash_call_resultpre_state_block_num_call_results                 rW    test_eth_call_old_contract_statez.EthModuleTest.test_eth_call_old_contract_state7  s    ((2!(+	"6*
+55==?DDF*44<<>CC% D 

  ))::<EE,-
 VV88A
 ,9+B+B+J+J+L+Q+Q'6 ,R ,
(
 "/!8!8!@!@!B!G!G' "H "
 +8*A*A*I*I*K*P*P& +Q +
'
 /2RUV2VVVV+%""" ""	
"	
"rY   c                    |j                   j                  i       }t        |j                        sJ |j                   j	                  |j                        }|du sJ |j                   j	                  |j                        }|du sJ y r  r  )ra   rL   r  r  r  s        rW   test_eth_uninstall_filterz'EthModuleTest.test_eth_uninstall_filterb  sv    r"))***&&))&*:*:;$&&))&*:*:;%rY   c                 T    |j                   j                  |      }t        |      sJ y rF  r  )ra   rL   r  r
  s       rW   r  z*EthModuleTest.test_eth_get_raw_transactionl  s$    &&44^D(((rY   c                     t        j                  t        dt         d      5  |j                  j                  t               d d d        y # 1 sw Y   y xY wr  r  r  s     rW   r  z7EthModuleTest.test_eth_get_raw_transaction_raises_errorp  sF    ]])A,q'Q
 	5 FF&&|4	5 	5 	5s    AAc                    |j                   j                  ||t        d      d       d }|s 	 |j                   j                  dd      }|s t        |      sJ |d   }t        |      sJ |j                   j                  |d      }t        |      sJ |d   }t        |      sJ |j                   j                  |d      }t        |      sJ y # t        $ r Y w xY w)Nrj   ro  r   r   r  r  )r_   rr   r@   r  r0   r   r   )ra   rL   r  r'  r
  block_with_txn_numberblock_with_txn_hashs          rW   r  z3EthModuleTest.test_eth_get_raw_transaction_by_blockv  s     	97Q	
 !"$&&"E"EhPQ"R " ((( !/x 8/000&&==>SUVW((( -V4+,,,&&==>QSTU((( ' s   C 	CCr  r  c                     t        j                  t        dt        |      d      5  |j                  j                  |d       d d d        y # 1 sw Y   y xY wr  r  )ra   rL   r  s      rW   r  z@EthModuleTest.test_eth_get_raw_transaction_by_block_raises_error  sZ     ]]4$%>?B+O
 	N FF//0I1M	N 	N 	Ns   AAc                     d}t        j                  t        d|       5  |j                  j	                  |d       d d d        y # 1 sw Y   y xY wr	  r  )ra   rL   r  s      rW   r  zQEthModuleTest.test_eth_get_raw_transaction_by_block_raises_error_block_identifier  sW     ']]O%&(
 	G FF//0BAF	G 	G 	Gs   AAc                     |j                   j                  }||j                   _        |j                   j                  }||k(  sJ ||j                   _        y rF  rd  )ra   rL   r  current_defaultre  s        rW   test_default_accountz"EthModuleTest.test_default_account  sN     &&00 "C&&00"CCCC "1rY   c                     |j                   j                  }|dk(  sJ t        d      |j                   _        |j                   j                  }|t        d      k(  sJ d|j                   _        y ri  rj  )ra   rL   rk  s      rW   test_default_blockz EthModuleTest.test_default_block  sd    
 ,,(((  +51,,E 2222  (rY   )rL   rK   rO   N)rL   rK   r  rI   rO   N)rL   rK   r5  rI   rO   N)rL   rK   r7  rI   rO   N)rL   rK   r  rI   rO   N)rL   rK   rN   rI   rO   N)rN   rI   rO   N)rN   rI   r}  rG   rO   N)r  r  r  r  r  r  r8   r  r  rb   r  r   r#   r  r  r   r  r  r  r  r   r  r  r   rC  r  r  r  r  r-  r  r!  r$  r&  rz  r  r  r  r  r4  r  r  r)  r;  r=  r   r   r   rD  rF  rH  rJ  rO  rx   r   rV  r   r   r   r   r   r   r   r   r@   rh  rl  rh  rj  rl  rn  rp  rs  ru  rw  ry  r|  r  r   r   r   r  r  r  r>  rH  r<   rJ  rM  rR  rW  r  r  r  r   r   r   r{  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  rs  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	   r   r  r  r  r  rG  rY   rW   r  r  N
  s*   9"+
:
:
:'0
:	
:/
,<<*.}*=<	<&I"
!
!
		0 [[!	#%BC
0
0#2
0DH
0	
0	
0,0;;,6;	;&&=L&	&
*
*=L
*	
*&&'0&	&&&'0&	&&&*3&	&&&*3&	&	$	$'0	$		$	$	$'0	$		$1@	!!1@!	!)3	,6	%% ,;% "	%
 
%:!*!*=L!*	!*F
1
1=L
1	
13-3- ,;3- "6(D.1	3-
 
3-j44 ,;4 "6(D.1	4
 
4l<<3B<	<(<<3B<	<0<<3B<	<0@@3B@	@4443B4	4299=L9	9*66=L6	6.663B6	6>66=L6	6(88=L8	8*$$=L$	$$00=L0	000=L0	0//=L/	/,00=L0	0 00=L0	0, [[%N<M+N  ",", ,;", 	",
 
",",H,, ,;, 
	,2,,=L,	,,AA=LA	A8FF=LF	FB===L=	=.=L	&===L=	=&==3B=	=(===L=	= 

3B
	
,,,3B,	,6,,3B,	,2QQ3BQ	Q:!Y!Y3B!Y	!YF11061	1"..06.	.&K,K,06K,GQK,	K,Z	%%+5%	%> [[ t 2i[!12FR	{;K4LM  !%=$r)%56I;?O8PQ	
&	K	K "	K $		K
 
	K'&	K)3	** $* "1	*
 
*($$ $$ "1	$
 
$ ** $* "1	*
 
**** $* "1	*
 
*$+:Z [[2J2JA3KB4L2J2J2J2J2J
	
##  *# 	#
 S	# 
## DD #-D "1	D
 #D 
D(!4!4 #-!4 
	!4F44 #-4 "1	4
 #4 
42 [[_eBl;DD #-D 	D
 
D <D  #- "1	
 # 
* [[8:NO#D#D #-#D "1	#D
 ##D $'#D 
#D P#DJ #- "1	
 # 
*
",
 

I",I #I 
	I,, $, "1	,
 
,$,, $, "1	,
 
, ** $* "1	*
 
**** $* "1	*
 
*$  =L 	   =L 	  [[ t 2i[!12FR	{;K4LM  !%=$r)%56I;?O8PQ	
&	O	O "	O $		O
 
	O'&	O>& >y >T >++'0+	+%88'08	8)11'01	1;;'0;	;66'06	600'00	000'00	0HH*3H	H**'0*	*4**'0*	***'0*	***'0*	*? ? ?SW ?
OO9?O	O??*3?EK?	???*3?EK?	?''*3'EK'	'"55=L5	5 KK "+K %	K
 "K 
K0''*3'EK'	'"GG=LG	G(KK "+K %	K
 "K 
K0	& & 3<& 	& P"
"
 "+"
 #2	"

 ""
 
"
H%
%
 "+%
 #2	%

 "%
 
%
N )
)
 ")
 "1	)

 
)
V )v )v )RV )5!)!) ,;!) "	!)
 
!)F [[8=,:WX
N
N5:3=5I
N	
N Y
NGG	G11=L1	1(( 
(rY   r  )fr   r  r   r  randomr   rw  typingr   r   r   r   r   r	   r
   eth_abirU   
eth_typingr   r   r   r   	eth_utilsr   r   r   r   r   r   r   r   r   r   eth_utils.toolzr   r   hexbytesr   web3._utils.ensr   "web3._utils.error_formatters_utilsr   web3._utils.fee_utilsr   web3._utils.method_formattersr   /web3._utils.module_testing.module_testing_utilsr    r!   r"    web3._utils.module_testing.utilsr#   web3._utils.type_conversionr$   web3.exceptionsr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   web3.middlewarer5   r6   
web3.typesr7   r8   r9   r:   r;   r<   r=   r>   r?   r@   r-  r  r  r  r  r  _pytest.monkeypatchrG   web3.contractrH   rI   	web3.mainrJ   rK   rX   r[   r  rG  rY   rW   <module>r2     sH       
       
    $   "vBCD H a )  a  Z  /&'#$?@  w&  w& tMA&( A&(rY   