
    	be                      P    d dl mZ d dlZd dlT d dlZd dlmZ d dlZd dlm	Z	 d Z
dS )    )unicode_literalsN)*)settings)Web3c                     t           j        } d}d| z   }d}dd|gdd}ddd	}t          j        |||
          }|j        dk    r|t          j        |j                  }|d         r[|d         d         }t          |           t          
                    |          }	t          j        |	d          }
t          |
           d S )N   z&https://matic-mumbai.g.alchemy.com/v2/B0x09a1b9449cde0bfd17430c490968b2482ad598c6adda78529d4001264571a378   z2.0eth_getTransactionByHash)idjsonrpcparamsmethodzapplication/json)acceptzcontent-type)jsonheaders   resultvalueether)r   ALCHEMY_ACCESS_KEYrequestspoststatus_coder   loadstextprintfloatfromhexr   from_wei)api_keymax_retriesurltxHashpayloadr   responsedatavalueHexr   
finalPrices              a/Users/christophesurbier/Documents/Programmation/SellTix/tixsellbackend/scripts/getTransaction.pyrunr+      s    )G K 37
:COF
h(	 G !& G
 }Sw@@@HS  z(-((> 	H~g.H(OOOMM(++Eg66J*     )
__future__r   loggingbackoffice.modelsr   tixsellr   r   web3r   r+    r,   r*   <module>r3      s{    ' ' ' ' ' '                   * * * * *r,   