Skip to content

Commit 1c99a71

Browse files
committed
changes comments to english
1 parent 360a831 commit 1c99a71

File tree

4 files changed

+222
-139
lines changed

4 files changed

+222
-139
lines changed

tronapi/cli.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def main():
1212
parser = argparse.ArgumentParser(
1313
formatter_class=argparse.RawDescriptionHelpFormatter,
14-
description="Инструмент командной строки для взаимодействия с TronAPI")
14+
description="Command line tool for interacting with TronAPI")
1515

1616
parser.add_argument(
1717
'--node',
@@ -20,23 +20,23 @@ def main():
2020
help='URL полной ноды (default: "http://13.125.210.234:8090")'
2121
)
2222

23-
subparsers = parser.add_subparsers(help='Команды')
23+
subparsers = parser.add_subparsers(help='Commands')
2424

25-
parser_send = subparsers.add_parser('send', help='Отправляем транзакцию')
25+
parser_send = subparsers.add_parser('send', help='Send transaction')
2626
parser_send.set_defaults(command="send")
27-
parser_send.add_argument('fromaddress', type=str, help='Адрес отправителя')
28-
parser_send.add_argument('toaddress', type=str, help='Адрес получателя')
29-
parser_send.add_argument('amount', type=float, help='Сумма отправки')
30-
parser_send.add_argument('privatekey', type=str, help='Приватный ключ')
31-
32-
parser.add_argument("--gettransaction", action="store", help="Получаем информацию о транзакции по TxID")
33-
parser.add_argument("--getaccount", action="store", help="Информация об аккаунте")
34-
parser.add_argument("--getbalance", action="store", help="Получение баланса")
27+
parser_send.add_argument('fromaddress', type=str, help='From address')
28+
parser_send.add_argument('toaddress', type=str, help='To address')
29+
parser_send.add_argument('amount', type=float, help='Amount')
30+
parser_send.add_argument('privatekey', type=str, help='Private key')
31+
32+
parser.add_argument("--gettransaction", action="store", help="Get TxID transaction information")
33+
parser.add_argument("--getaccount", action="store", help="Account Information")
34+
parser.add_argument("--getbalance", action="store", help="Getting a balance")
3535
parser.add_argument("--getbandwidth", action="store",
36-
help="Выбирает доступную пропускную способность для определенной учетной записи")
37-
parser.add_argument("--getcurrentblock", action="store_true", help="Последний номер блока")
38-
parser.add_argument("--gettransactioncount", action="store_true", help="Получаем общий счетчик транзакций")
39-
parser.add_argument("--generateaddress", action="store_true", help="Генерация нового адреса")
36+
help="Query bandwidth information.")
37+
parser.add_argument("--getcurrentblock", action="store_true", help="Last block number")
38+
parser.add_argument("--gettransactioncount", action="store_true", help="Get the total transaction count")
39+
parser.add_argument("--generateaddress", action="store_true", help="Generate new address")
4040

4141
args = parser.parse_args()
4242

tronapi/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
2+
3+
# Tron nodes
14
DEFAULT_FULL_NODE = "https://api.trongrid.io"
5+
DEFAULT_SOLIDITY_NODE = "https://api.trongrid.io"

tronapi/provider.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from urllib3 import get_host
55
import json
66

7-
87
urllib3.disable_warnings()
98

9+
1010
class HttpProvider:
1111
def __init__(self, host, timeout=30000, user=False, password=False, headers=None,
1212
status_page='/wallet/getnowblock'):
@@ -21,7 +21,7 @@ def __init__(self, host, timeout=30000, user=False, password=False, headers=None
2121
self.headers = headers
2222
self.status_page = status_page
2323

24-
# Разделяем хост
24+
# We share the host
2525
scheme, base_url, port = get_host(host)
2626

2727
if isnan(timeout) or timeout < 0:
@@ -45,7 +45,7 @@ def request(self, url, body=None, method='GET'):
4545
return json.loads(response)
4646

4747
def is_connected(self):
48-
"""Проверка соединения с подключенного нода"""
48+
"""Checking the connection from the connected node"""
4949
if self.host:
5050
response = self.request(self.status_page)
5151
return 'blockID' in response

0 commit comments

Comments
 (0)