
    (ig              
          d dl mZ d dlmZmZmZ d dlZd dl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 d dlmZ ddlmZ d	ed
e
de
ee
df   z  fdZdedeeedz  f   dz  fdZdeddfdZ deddfdZ!dee"ee
f   z  ez  defdZ#dedefdZ$dededee   fdZ%eded   dedee   fd       Z&eded   dedee   fd       Z&eded   dedee   fd       Z&eded    dedee   fd!       Z&eded"   dedee   fd#       Z&eded$   dedee   fd%       Z&ded&   dedeeez  ez  ez  ez  ez     fd'Z&dedee   fd(Z'dedee   fd)Z(ded*ee
   dz  d+e"ee
f   dz  dee
df   fd,Z)ded-ee
df   ee
e
f   z  deeedf   ee
df   f   fd.Z*dede+edz     fd/Z,dede+e   fd0Z-dede+edz     fd1Z.dede+e   fd2Z/d3ede0fd4Z1dede0fd5Z2d6ede0fd7Z3d8ede0fd9Z4y):    )abc)IterableMappingSequenceN)AnyLiteralcastoverload)	ABIABIComponentABIConstructor
ABIElementABIErrorABIEventABIFallbackABIFunction
ABIReceive)is_list_like   )keccakarg_abinormalized_argreturn.c                 ^   t        | j                  dd            }|S |\  }}|(t        t        t           | j                  dg             }nI|j                  d      }t        j                  |       }|d|dz
  z  z   |d<   t        j                  |      }t        t        j                        rt        fd|D              }n}t        |      s t        d| j                  d       d	|       t        |t              rt        n
t        |      }	 |	d
 t!        ||      D              S )z
    Aligns the values of any mapping at any level of nesting in ``normalized_arg``
    according to the layout of the corresponding abi spec.
    type 
components[z[]r   c              3   .   K   | ]  }|d         ywnameN ).0abir   s     >/var/www/br/venv/lib/python3.12/site-packages/eth_utils/abi.py	<genexpr>z#_align_abi_input.<locals>.<genexpr>F   s     LCN3v;7L   z"Expected non-string sequence for "z" component type: got c              3   :   K   | ]  \  }}t        ||        y wN_align_abi_input)r#   sub_abisub_args      r%   r&   z#_align_abi_input.<locals>.<genexpr>S   s#      GW 	'*   )_get_tuple_type_str_and_dimsgetr	   r   r   countcopy	itertoolsrepeat
isinstancer   r   tupler   	TypeErrorr   zip)
r   r   tuple_partstuple_prefix
tuple_dimssub_abisnum_dimsnew_abialigned_argtypings
    `        r%   r+   r+   (   s,    /w{{62/FGK*L* .L"0MN##C( ))G$&A)>>##G,.#++.L8LL$$0V1D0E F##.-1
 	
 !e4U${:KF  #Hk :      sc                     d}t        j                  |      j                  |       }|&|j                  d      }|j                  d      }||fS y)z
    Takes a JSON ABI type string.  For tuple type strings, returns the separated
    prefix and array dimension parts.  For all other strings, returns ``None``.
    z^(tuple)((\[([1-9]\d*)?])*)??$Nr      )recompilematchgroup)rB   tuple_type_str_rerG   r:   r;   s        r%   r/   r/   Y   sR    
 =JJ()//2E{{1~[[^
Z''rA   abi_elementc                 t    | d   dk7  r0t        d| j                  d       d| j                  d       d      y )Nr   functionzGOutputs only supported for ABI type `function`. Provided ABI type was `z` and outputs were `outputs`.
ValueErrorr0   rJ   s    r%   _raise_if_not_function_abirR   j   sP    6j()oof56 7	*+2/
 	
 )rA   c                     | d   dk(  s| d   dk(  r0t        d| j                  d       d| j                  d       d      y )Nr   fallbackreceivezXInputs not supported for function types `fallback` or `receive`. Provided ABI type was `z` with inputs `inputsrN   rO   rQ   s    r%   !_raise_if_fallback_or_receive_abirW   s   s]    6j(K,?9,L)oof56 7)*".
 	
 -MrA   r$   c                 (   t        | t              r| S | j                  d      }t        |t              s#t        dt	        |       dt        |             |j                  d      s|S dj                  d | d   D              }|dd	 }d
| d| }|S )aV  
    Extract argument types from a function or event ABI parameter.

    With tuple argument types, return a Tuple of each type.
    Returns the param if `abi` is an instance of str or another non-tuple
    type.

    :param abi: A Function or Event ABI component or a string with type info.
    :type abi: `Union[ABIComponent, Dict[str, Any], str]`
    :return: Type(s) for the function or event ABI param.
    :rtype: `str`

    .. doctest::

        >>> from eth_utils.abi import collapse_if_tuple
        >>> abi = {
        ...   'components': [
        ...     {'name': 'anAddress', 'type': 'address'},
        ...     {'name': 'anInt', 'type': 'uint256'},
        ...     {'name': 'someBytes', 'type': 'bytes'},
        ...   ],
        ...   'type': 'tuple',
        ... }
        >>> collapse_if_tuple(abi)
        '(address,uint256,bytes)'
    r   z%The 'type' must be a string, but got z	 of type r6   ,c              3   2   K   | ]  }t        |        y wr)   collapse_if_tuple)r#   cs     r%   r&   z$collapse_if_tuple.<locals>.<genexpr>   s     I!*1-I   r      N())r5   strr0   r7   reprr   
startswithjoin)r$   element_type	delimited	array_dim	collapseds        r%   r\   r\   |   s    6 #s
776?LlC(3D4F3GyL!"$
 	
 $$W-Is<7HIII QR II;a	{+IrA   c                    d}t        | j                  dd            }|dk(  s|dk(  r|j                  |d      S |dk(  r|}nt        | j                  d|            }|j                  |d	j                  t	        |                   S )
a5  
    Returns a string signature representation of the function or event ABI
    and arguments.

    Signatures consist of the name followed by a list of arguments.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :return: Stringified ABI signature
    :rtype: `str`

    .. doctest::

        >>> from eth_utils import abi_to_signature
        >>> abi_element = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> abi_to_signature(abi_element)
        'f(uint256)'
    z{name}({input_types})r   r   rT   rU   )r!   input_typesconstructorr!   rY   )rb   r0   formatre   get_abi_input_types)rJ   	signatureabi_typefn_names       r%   abi_to_signaturerr      s    @ (I;??62./H:Y!6X2>>= koofh78#((+>{+K"L   rA   abi_namecontract_abic                 l    |D cg c]$  }|d   dk(  s|d   dk(  s|d   dk(  r
|d   | k(  r|& c}S c c}w )a  
    Get one or more function and event ABIs by name.

    :param abi_name: Name of the function, event or error.
    :type abi_name: `str`
    :param contract_abi: Contract ABI.
    :type contract_abi: `ABI`
    :return: Function or event ABIs with matching name.
    :rtype: `Sequence[ABIElement]`

    .. doctest::

            >>> from eth_utils.abi import filter_abi_by_name
            >>> abi = [
            ...     {
            ...         "constant": False,
            ...         "inputs": [],
            ...         "name": "func_1",
            ...         "outputs": [],
            ...         "type": "function",
            ...     },
            ...     {
            ...         "constant": False,
            ...         "inputs": [
            ...             {"name": "a", "type": "uint256"},
            ...         ],
            ...         "name": "func_2",
            ...         "outputs": [],
            ...         "type": "function",
            ...     },
            ...     {
            ...         "constant": False,
            ...         "inputs": [
            ...             {"name": "a", "type": "uint256"},
            ...             {"name": "b", "type": "uint256"},
            ...         ],
            ...         "name": "func_3",
            ...         "outputs": [],
            ...         "type": "function",
            ...     },
            ...     {
            ...         "constant": False,
            ...         "inputs": [
            ...             {"name": "a", "type": "uint256"},
            ...             {"name": "b", "type": "uint256"},
            ...             {"name": "c", "type": "uint256"},
            ...         ],
            ...         "name": "func_4",
            ...         "outputs": [],
            ...         "type": "function",
            ...     },
            ... ]
            >>> filter_abi_by_name("func_1", abi)
            [{'constant': False, 'inputs': [], 'name': 'func_1', 'outputs': [], 'type': 'function'}]
    r   rL   eventerrorr!   r"   )rs   rt   r$   s      r%   filter_abi_by_namerx      sW    v   Fz)v;')v;')Fx' 	  s   )1rp   rL   c                      y r)   r"   rp   rt   s     r%   filter_abi_by_typer{   #      
 	rA   rl   c                      y r)   r"   rz   s     r%   r{   r{   +  r|   rA   rT   c                      y r)   r"   rz   s     r%   r{   r{   3  r|   rA   rU   c                      y r)   r"   rz   s     r%   r{   r{   ;  r|   rA   rv   c                      y r)   r"   rz   s     r%   r{   r{   C  r|   rA   rw   c                      y r)   r"   rz   s     r%   r{   r{   K  r|   rA   )rL   rl   rT   rU   rv   rw   c                    | dk(  r|D cg c]  }|d   dk(  s| c}S | dk(  r|D cg c]  }|d   dk(  s| c}S | dk(  r|D cg c]  }|d   dk(  s| c}S | dk(  r|D cg c]  }|d   dk(  s| c}S | dk(  r|D cg c]  }|d   dk(  s| c}S | dk(  r|D cg c]  }|d   dk(  s| c}S t        d|        c c}w c c}w c c}w c c}w c c}w c c}w )	as  
    Return a list of each ``ABIElement`` that is of type ``abi_type``.

    For mypy, function overloads ensures the correct type is returned based on the
    ``abi_type``. For example, if ``abi_type`` is "function", the return type will be
    ``Sequence[ABIFunction]``.

    :param abi_type: Type of ABI element to filter by.
    :type abi_type: `str`
    :param contract_abi: Contract ABI.
    :type contract_abi: `ABI`
    :return: List of ABI elements of the specified type.
    :rtype: `Sequence[Union[ABIFunction, ABIConstructor, ABIFallback, ABIReceive, ABIEvent, ABIError]]`

    .. doctest::

        >>> from eth_utils import filter_abi_by_type
        >>> abi = [
        ...   {"type": "function", "name": "myFunction", "inputs": [], "outputs": []},
        ...   {"type": "function", "name": "myFunction2", "inputs": [], "outputs": []},
        ...   {"type": "event", "name": "MyEvent", "inputs": []}
        ... ]
        >>> filter_abi_by_type("function", abi)
        [{'type': 'function', 'name': 'myFunction', 'inputs': [], 'outputs': []}, {'type': 'function', 'name': 'myFunction2', 'inputs': [], 'outputs': []}]
    rL   r   rl   rT   rU   rv   rw   zUnsupported ABI type: )rP   )rp   rt   r$   s      r%   r{   r{   S  s   F :+Is6{j/HII	]	"+Ls6{m/KLL	Z	+Is6{j/HII	Y	+Hs6{i/GHH	W	+Fs6{g/EFF	W	+Fs6{g/EFF1(<== JLIHFFsD   CCCCCC$C2CCC C.Cc                     t        d|       S )a  
    Return interfaces for each function in the contract ABI.

    :param contract_abi: Contract ABI.
    :type contract_abi: `ABI`
    :return: List of ABIs for each function interface.
    :rtype: `Sequence[ABIFunction]`

    .. doctest::

        >>> from eth_utils import get_all_function_abis
        >>> contract_abi = [
        ...   {"type": "function", "name": "myFunction", "inputs": [], "outputs": []},
        ...   {"type": "function", "name": "myFunction2", "inputs": [], "outputs": []},
        ...   {"type": "event", "name": "MyEvent", "inputs": []}
        ... ]
        >>> get_all_function_abis(contract_abi)
        [{'type': 'function', 'name': 'myFunction', 'inputs': [], 'outputs': []}, {'type': 'function', 'name': 'myFunction2', 'inputs': [], 'outputs': []}]
    rL   r{   rt   s    r%   get_all_function_abisr     s    * j,77rA   c                     t        d|       S )a  
    Return interfaces for each event in the contract ABI.

    :param contract_abi: Contract ABI.
    :type contract_abi: `ABI`
    :return: List of ABIs for each event interface.
    :rtype: `Sequence[ABIEvent]`

    .. doctest::

        >>> from eth_utils import get_all_event_abis
        >>> contract_abi = [
        ...   {"type": "function", "name": "myFunction", "inputs": [], "outputs": []},
        ...   {"type": "function", "name": "myFunction2", "inputs": [], "outputs": []},
        ...   {"type": "event", "name": "MyEvent", "inputs": []}
        ... ]
        >>> get_all_event_abis(contract_abi)
        [{'type': 'event', 'name': 'MyEvent', 'inputs': []}]
    rv   r   r   s    r%   get_all_event_abisr     s    ( g|44rA   argskwargsc                   
 t        |        t        t        t           | j	                  dg             }t        |      t        |      z   t        |      k7  r0t        dt        |       dt        |      t        |      z    d      |st        t        t        df   |      S t        |j                               }t        d |D              
t        t        
|            }|j                  |j                               }|r/t        | j	                  d       dd	j                  |       d      t        t        |j!                  
                  }|rd
}| j	                  d      r<t        |j#                  | j	                  d       dd	j                  |                  t        |j#                  d| j	                  d       dd	j                  |                  t        t        t        t%        j&                  |j)                         |j)                               
fd             }	t        |	      dkD  rt        |	d         S t               S )a  
    Flattens positional args (``args``) and keyword args (``kwargs``) into a Tuple and
    uses the ``abi_element`` for validation.

    Checks to ensure that the correct number of args were given, no duplicate args were
    given, and no unknown args were given.  Returns a list of argument values aligned
    to the order of inputs defined in ``abi_element``.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :param args: Positional arguments for the function.
    :type args: `Optional[Sequence[Any]]`
    :param kwargs: Keyword arguments for the function.
    :type kwargs: `Optional[Dict[str, Any]]`
    :return: Arguments list.
    :rtype: `Tuple[Any, ...]`

    .. doctest::

        >>> from eth_utils import get_normalized_abi_inputs
        >>> abi = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 'name',
        ...       'type': 'string'
        ...     },
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     },
        ...     {
        ...       'name': 't',
        ...       'components': [
        ...         {'name': 'anAddress', 'type': 'address'},
        ...         {'name': 'anInt', 'type': 'uint256'},
        ...         {'name': 'someBytes', 'type': 'bytes'},
        ...       ],
        ...       'type': 'tuple'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> get_normalized_abi_inputs(
        ...   abi, *('myName', 123), **{'t': ('0x1', 1, b'\x01')}
        ... )
        ('myName', 123, ('0x1', 1, b'\x01'))
    rV   z$Incorrect argument count. Expected 'z', got 'z'..c              3   &   K   | ]	  }|d      ywr    r"   )r#   r   s     r%   r&   z,get_normalized_abi_inputs.<locals>.<genexpr>  s     LWV_Ls   r!   z(() got multiple values for argument(s) 'z, z+{} got unexpected keyword argument(s) '{}'.z()zType: 'r   'c                 ,    j                  | d         S )Nr   )index)kvsorted_arg_namess    r%   <lambda>z+get_normalized_abi_inputs.<locals>.<lambda>  s    /55be< rA   )keyr   r   )rW   r	   r   r   r0   lenr7   r6   r   setkeysdictr8   intersectionre   sorted
differencerm   r3   chainitems)rJ   r   r   function_inputskwarg_namesargs_as_kwargsduplicate_argsunknown_argsmessagesorted_argsr   s             @r%   get_normalized_abi_inputsr     s#   r &k28L1;??8R3PQO
4y3v;#o"66233G2H I$i#f+-.b2
 	
 E#s(OT**fkkm$KLOLL#.56N !--n.A.A.CDNv&' (		.)*".
 	
  6 67G HIJL???6"+//&"9!:"=tyy?VW  NN+//&12!4dii6M
 	
 0D0D0FG<	
K ;![^$$wrA   normalized_argsc                 ,   t        |        t        t        t           | j	                  dg             }t        t        j                        rt        fd|D              t        d |D               t              d t        |      D              fS )a6  
    Returns a pair of nested Tuples containing a list of types and a list of input
    values sorted by the order specified by the ``abi``.

    ``normalized_args`` can be obtained by using
    :py:meth:`eth_utils.abi.get_normalized_abi_inputs`, which returns nested mappings
    or sequences corresponding to tuple-encoded values in ``abi``.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :param normalized_args: Normalized arguments for the function.
    :type normalized_args: `Union[Tuple[Any, ...], Mapping[Any, Any]]`
    :return: Tuple of types and aligned arguments.
    :rtype: `Tuple[Tuple[str, ...], Tuple[Any, ...]]`

    .. doctest::

        >>> from eth_utils import get_aligned_abi_inputs
        >>> abi = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 'name',
        ...       'type': 'string'
        ...     },
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> get_aligned_abi_inputs(abi, ('myName', 123))
        (('string', 'uint256'), ('myName', 123))
    rV   c              3   .   K   | ]  }|d         ywr    r"   )r#   r$   r   s     r%   r&   z)get_aligned_abi_inputs.<locals>.<genexpr>W  s       
-0OCK( 
r'   c              3   2   K   | ]  }t        |        y wr)   r[   )r#   r$   s     r%   r&   z)get_aligned_abi_inputs.<locals>.<genexpr>\  s     C$Cr^   c              3   :   K   | ]  \  }}t        ||        y wr)   r*   )r#   r$   args      r%   r&   z)get_aligned_abi_inputs.<locals>.<genexpr>]  s#      
S S#&
r.   )rW   r	   r   r   r0   r5   r   r   r6   r   r8   )rJ   r   abi_element_inputss    ` r%   get_aligned_abi_inputsr   '  s    V &k2h|4koohPR6ST/3;;/  
4F 
 

 	C0BCC_ 
 2OD
 	
 rA   c                     t        |        t        t        t           | j	                  dg             D cg c]  }|j	                  dd       c}S c c}w )a  
    Return names for each input from the function or event ABI.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :return: Names for each input in the function or event ABI.
    :rtype: `List[Optional[str]]`

    .. doctest::

        >>> from eth_utils import get_abi_input_names
        >>> abi = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> get_abi_input_names(abi)
        ['s']
    rV   r!   N)rW   r	   r   r   r0   rJ   r   s     r%   get_abi_input_namesr   d  sP    : &k2 ."0MN 	     Ac                     t        |        t        t        t           | j	                  dg             D cg c]  }t        |       c}S c c}w )a  
    Return types for each input from the function or event ABI.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :return: Types for each input in the function or event ABI.
    :rtype: `List[str]`

    .. doctest::

        >>> from eth_utils import get_abi_input_types
        >>> abi = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> get_abi_input_types(abi)
        ['uint256']
    rV   )rW   r	   r   r   r0   r\   r   s     r%   rn   rn     sJ    : &k2 ."0MN 	#     A
c                     t        |        t        t        t           | j	                  dg             D cg c]  }|j	                  dd       c}S c c}w )a  
    Return names for each output from the ABI element.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :return: Names for each function output in the function ABI.
    :rtype: `List[Optional[str]]`

    .. doctest::

        >>> from eth_utils import get_abi_output_names
        >>> abi = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [
        ...     {
        ...       'name': 'name',
        ...       'type': 'string'
        ...     },
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> get_abi_output_names(abi)
        ['name', 's']
    rM   r!   N)rR   r	   r   r   r0   r   s     r%   get_abi_output_namesr     sQ    L {+ .	20NO 	  r   c                     t        |        t        t        t           | j	                  dg             D cg c]  }t        |       c}S c c}w )a  
    Return types for each output from the function ABI.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :return: Types for each function output in the function ABI.
    :rtype: `List[str]`

    .. doctest::

        >>> from eth_utils import get_abi_output_types
        >>> abi = {
        ...   'constant': False,
        ...   'inputs': [
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'name': 'f',
        ...   'outputs': [
        ...     {
        ...       'name': 'name',
        ...       'type': 'string'
        ...     },
        ...     {
        ...       'name': 's',
        ...       'type': 'uint256'
        ...     }
        ...   ],
        ...   'payable': False,
        ...   'stateMutability': 'nonpayable',
        ...   'type': 'function'
        ... }
        >>> get_abi_output_types(abi)
        ['string', 'uint256']

    rM   )rR   r	   r   r   r0   r\   r   s     r%   get_abi_output_typesr     sK    N {+ .	20NO 	#  r   function_signaturec                 @    t        | j                  dd            dd S )a  
    Return the 4-byte function selector from a function signature string.

    :param function_signature: String representation of the function name and arguments.
    :type function_signature: `str`
    :return: 4-byte function selector.
    :rtype: `bytes`

    .. doctest::

        >>> from eth_utils import function_signature_to_4byte_selector
        >>> function_signature_to_4byte_selector('myFunction()')
        b'\xc3x\n:'
     r   textN   r   replace)r   s    r%   $function_signature_to_4byte_selectorr     s$     )11#r:;BQ??rA   c                 .    t        |       }t        |      S )a  
    Return the 4-byte function signature of the provided function ABI.

    :param abi_element: ABI element.
    :type abi_element: `ABIElement`
    :return: 4-byte function signature.
    :rtype: `bytes`

    .. doctest::

        >>> from eth_utils import function_abi_to_4byte_selector
        >>> abi_element = {
        ...   'type': 'function',
        ...   'name': 'myFunction',
        ...   'inputs': [],
        ...   'outputs': []
        ... }
        >>> function_abi_to_4byte_selector(abi_element)
        b'\xc3x\n:'
    )rr   r   )rJ   r   s     r%   function_abi_to_4byte_selectorr     s    * *+6/0BCCrA   event_signaturec                 :    t        | j                  dd            S )a  
    Return the 32-byte keccak signature of the log topic for an event signature.

    :param event_signature: String representation of the event name and arguments.
    :type event_signature: `str`
    :return: Log topic bytes.
    :rtype: `bytes`

    .. doctest::

        >>> from eth_utils import event_signature_to_log_topic
        >>> event_signature_to_log_topic('MyEvent()')
        b'M\xbf\xb6\x8bC\xdd\xdf\xa1+Q\xeb\xe9\x9a\xb8\xfd\xedb\x0f\x9a\n\xc21B\x87\x9aO\x19*\x1byR\xd2'
    r   r   r   r   )r   s    r%   event_signature_to_log_topicr   2  s     ..sB788rA   	event_abic                 .    t        |       }t        |      S )aA  
    Return the 32-byte keccak signature of the log topic from an event ABI.

    :param event_abi: Event ABI.
    :type event_abi: `ABIEvent`
    :return: Log topic bytes.
    :rtype: `bytes`

    .. doctest::

        >>> from eth_utils import event_abi_to_log_topic
        >>> abi = {
        ...   'type': 'event',
        ...   'anonymous': False,
        ...   'name': 'MyEvent',
        ...   'inputs': []
        ... }
        >>> event_abi_to_log_topic(abi)
        b'M\xbf\xb6\x8bC\xdd\xdf\xa1+Q\xeb\xe9\x9a\xb8\xfd\xedb\x0f\x9a\n\xc21B\x87\x9aO\x19*\x1byR\xd2'
    )rr   r   )r   r   s     r%   event_abi_to_log_topicr   D  s    * 'y1O'88rA   )5collectionsr   collections.abcr   r   r   r2   r3   rE   r@   r   r   r	   r
   
eth_typingr   r   r   r   r   r   r   r   r   eth_utils.typesr   cryptor   r6   r+   rb   r/   rR   rW   r   r\   rr   rx   r{   r   r   r   r   listr   rn   r   r   bytesr   r   r   r   r"   rA   r%   <module>r      s:   
   	 
 
 

..+..5c?.bC E#sTz/,BT,I "
J 
4 

: 
$ 
-<$sCx.83> -3 -`-* - -`D DC DHZ<P DN 
	j!		 k	 
	 
	m$		 n	 
	 
	j!		 k	 
	 
	i 		 j	 
	 
	g		 h	 
	 
	g		 h	 
	0>J0> 	0>
 . ;.;hFQ0>f8 80E 805S 5Xh-? 5.ooC=4o 38nt#o 38_	od::38_wsCx'88: 5c?E#s(O+,:z!Z !Dt4D !H!Z !DI !H*j *T#*5E *Z+j +T#Y +\@S @U @$D
 Du D29# 9% 9$9h 95 9rA   