
    %j                     D    d dl Zd dlmc mZ d dlmZ d dlm	Z	 d Z
d ZdS )    N)Account)build_legacy_probe_planc           	      n   t          j                    }t          j                    j        }| dz                      d| d|j                                         d|j         dd           |                    dd	
           |                    dd	
           t          | f          }|d         }d}||k    }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }d}||u }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}d}|d         }||v }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }d}||u }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}d S )NTestnet.envHL_WALLET_ADDRESS=
HL_API_PRIVATE_KEY=	
API Key=
utf-8encoding
CTB_HL_ENVF)raisingCTB_TESTNET_TRADING_ALLOWEDsearch_dirsstatus	validated==z%(py1)s == %(py4)spy1py4assert %(py6)spy6.signed_actions_blocked_until_credentials_greenTisz%(py1)s is %(py4)sCTB_HL_ENV_not_testnetwarnings)in)z%(py1)s in %(py4)smainnet_blocked)r   createaddress
write_textkeyhexdelenvr   
@pytest_ar_call_reprcompare	_safereprAssertionError_format_explanation)
tmp_pathmonkeypatchsignerwalletplan@py_assert0@py_assert3@py_assert2@py_format5@py_format7s
             c/home/agent/projects/CryptoTradingBot/Crypto_Agent/tests/test_hl_testnet_legacy_credential_probe.py5test_legacy_probe_plan_does_not_require_trading_flagsr;      sv   ^F^%F))	&V 	& 	&$jnn..	& 	&>	& 	& 	& 	 *    |U3334eDDD"{;;;D>([(>[((((((((((>[(((((>(((([(((((((((((((((((((((((((((@AITIATIIIIIIIIIIATIIIIIAIIIITIIIIIIIIIIIIIIIIIIIIIIIIIII#7tJ'77#'77777777777#'777777#7777'7777777777777777777777777777!"*d*"d**********"d*****"****d*****************************    c           
      2
   t          j                    }t          j                    j        }| dz                      d| d|j                                         dt          j                    j         dd           |                    dd	           |                    d
d           t          | f          }|d         }d}||k    }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }|j        }|d d         }
 ||
          }|ssdt          j
        |          t          j
        |          t          j
        |
          t          j
        |          dz  }t          t          j        |                    d x}x}x}
}|d         }|j        }|j        d d         }
 ||
          }|ssdt          j
        |          t          j
        |          t          j
        |
          t          j
        |          dz  }t          t          j        |                    d x}x}x}
}|d         }d}||u }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }d}||u }|slt          j	        d|fd||f          t          j
        |          t          j
        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|j        }|j        } |            }t          |          }||v}|sVt          j	        d|fd||f          d t          j                    v st          j        |          rt          j
        |          nd t          j
        |          t          j
        |          t          j
        |          d!t          j                    v st          j        t                    rt          j
        t                    nd!d"t          j                    v st          j        |          rt          j
        |          nd"t          j
        |          d#z  }d$d%|iz  }t          t          j        |                    d x}x}x}x}}d S )&Nr   r   r   r	   r
   r   r   r   testnetr   truer   r   blockedr   r   r   r   r   account_address_masked   zLassert %(py7)s
{%(py7)s = %(py3)s
{%(py3)s = %(py1)s.startswith
}(%(py5)s)
})r   py3py5py7#agent_wallet_address_derived_maskedr   Tr   r    r$   )not in)z%(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.key
}.hex
}()
} not in %(py11)s
{%(py11)s = %(py8)s(%(py9)s)
}r2   strr4   )py0py2r   r   py8py9py11zassert %(py13)spy13)r   r%   r&   r'   r(   r)   setenvr   r+   r,   r-   r.   r/   
startswithrH   @py_builtinslocals_should_repr_global_name)r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   @py_assert4@py_assert6@py_format8@py_assert1@py_assert5@py_assert10@py_assert7@py_format12@py_format14s                      r:   @test_legacy_probe_plan_uses_wallet_as_account_and_derived_signerr]      s   ^F^%F))	0V 	0 	0$jnn..	0 	0>##+	0 	0 	0 	 *    |Y///4f==="{;;;D>&Y&>Y&&&&&&&&&&>Y&&&&&>&&&&Y&&&&&&&&&&&&&&&&&&&&&&&&&&&()@)4@VBQBZ@44Z@@@@@@@@)@@@@4@@@@Z@@@@@@@@@@@@@@@@@@@@@@@@@@@@56U6AU&.QSRSQSBTUAABTUUUUUUUU6UUUUAUUUUBTUUUUUUUUUUUUUUUUUUUUUUUUUUUU@AITIATIIIIIIIIIIATIIIIIAIIIITIIIIIIIIIIIIIIIIIIIIIIIIIII!"*d*"d**********"d*****"****d***************************:,:>,>>,3t99,9,,,,,,,,,,9,,,,,,,,,,,,6,,,,,6,,,,,,:,,,,>,,,,,,,,,,,,,,,3,,,,,3,,,,,,,,,,,,,t,,,,,t,,,,,,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,r<   )builtinsrQ   _pytest.assertion.rewrite	assertionrewriter+   eth_accountr   ,src.tools.hl_testnet_legacy_credential_prober   r;   r]    r<   r:   <module>re      sl                        P P P P P P+ + +(- - - - -r<   