
    (i                         d dl Z d dlmZ d dlmZ d dlmZ d dlmZmZ  e j                  dd      Z	de
d	e
fd
Zde
d	e
fdZd	efdZde
d	e
fdZy)    Nto_checksum_address)punctuation)random)datetimetimezone       sreturnc                 `    | j                         }t        D ]  }|j                  |d      } |S )N )lowerr   replace)r   loweredps      E/var/www/br/venv/lib/python3.12/site-packages/py_order_utils/utils.py	normalizer   
   s1    ggiG )//!R()N    addressc                     t        |       S )Nr   )r   s    r   normalize_addressr      s    w''r   c                      t        j                         j                  t        j                        j                         } t        | t               z        S )z
    Pseudo random seed
    )tzinfo)r   nowr   r   utc	timestamproundr   )r   s    r   generate_seedr      s;     ,,.
 
 
 
5
?
?
ACvx  r   in_strc                 @    | }t        |      dkD  r|dd dk7  rd| }|S )z9
    Prepend 0x to the input string if it is missing
    r	   N0x)len)r    r   s     r   
prepend_zxr$      s0     	A
1vzaetmHHr   )math	eth_utilsr   stringr   r   r   r   powmax_intstrr   r   intr   r$    r   r   <module>r-      sj     )   '
$((1b/  (s (s (!s !s s r   