-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTron.py
40 lines (31 loc) · 1.17 KB
/
Tron.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import logging
import time
from tronapi import Tron
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger()
full_node = 'https://api.trongrid.io'
solidity_node = 'https://api.trongrid.io'
event_server = 'https://api.trongrid.io/'
private_key = 'da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0'
tron = Tron(full_node=full_node,
solidity_node=solidity_node,
event_server=event_server)
while True:
account = tron.create_account
is_valid = bool(tron.isAddress(account.address.hex))
print(' ')
print(' ')
print('--------------------------------------------')
print('| GENERATED TRON NETWORK ACCOUNT |')
print('--------------------------------------------')
print('- ADDRESS: ' + account.address.base58)
time.sleep(0)
print('- PRIVATE KEY: ' + account.private_key)
time.sleep(0)
print('- PUBLIC KEY: ' + account.public_key)
time.sleep(0)
print('-- Hex: ' + account.address.hex)
time.sleep(0)
logger.debug('-- isValid: ' + str(is_valid))
print('==================(MMDRZA.COM)==================')
time.sleep(0.5)