andelf / tronpy

TRON Python Client Library.
MIT License
204 stars 96 forks source link

tronpy.exceptions.AddressNotFound: account not found on-chain (mainnet) #94

Closed IvanMontillaM closed 1 year ago

IvanMontillaM commented 1 year ago

Hello,

Thank you very much for this great work creating this library!

I created a wallet using client.generate_address() and then sent some USDT to the resulting address ('base58check_address': 'TN7W2KXdpDiPj4STtPBrk8QAZuUCgqzuax'). USDTs are still there as the only transaction it has ever had.

However, after running print(client.get_account('TN7W2KXdpDiPj4STtPBrk8QAZuUCgqzuax')) I'm getting the tronpy.exceptions.AddressNotFound: account not found on-chain exception thrown.

After reading some documentation (Account Activation)... How do I activate this address using this library? If you could, please provide some steps (I'm very new to programmatically managing a wallet).

I must be missing something very obvious. 😓

Thanks in advance,

MrNaif2018 commented 1 year ago

Hi! Just sending tokens to an address won't activate it. You would need to send TRX to it (1 TRX activation fee) for it to become active That's because you could create your own spam tokens and activate addresses this way, that's why mainnet currency is required for activation