
    (iy                     d    d dl Z d dlmZmZmZ d dlmZ d dlmZ erd dl	m
Z
 d
dededef   fd	Zy)    N)TYPE_CHECKINGAnyCallable)Web3ValidationError)PersistentConnectionProvider)	AsyncWeb3messagereturn.c                 P     dt         dt        f   dt         dt        f   f fd}|S )zx
    Decorator that raises an exception if the provider is not an instance of
    ``PersistentConnectionProvider``.
    func.r
   c           	      p     t        j                         dddt        dt        dt        f fd       }|S )NselfzAsyncWeb3[Any]argskwargsr
   c                     dj                    dt        | j                  t              st	               | g|i |S )Nz``zE`` can only be called on a ``PersistentConnectionProvider`` instance.)__name__
isinstanceproviderr   r   )r   r   r   r   r	   s      P/var/www/br/venv/lib/python3.12/site-packages/web3/providers/persistent/utils.pyinnerzGpersistent_connection_provider_method.<locals>.decorator.<locals>.inner   sW      (A A 
 dmm-IJ)'22.t.v..    )	functoolswrapsr   )r   r   r	   s   ` r   	decoratorz8persistent_connection_provider_method.<locals>.decorator   sB    		
	/( 
	/ 
	/ 
	/ 
	/ 

	/ r   )r   r   )r	   r   s   ` r   %persistent_connection_provider_methodr      s0    c* xS/A   r   )N)r   typingr   r   r   web3.exceptionsr   web3.providersr   	web3.mainr   strr    r   r   <module>r"      sC      
3 (3PS8BT r   