21
21
import base58
22
22
import math
23
23
24
+ from tronapi import config
24
25
from tronapi .crypto import utils
25
26
from tronapi .provider import HttpProvider
26
27
27
- # Server API from tron.network
28
- TRON_NODE = 'https://server.tron.network'
29
-
30
28
31
29
class Tron :
32
30
@@ -40,7 +38,7 @@ def __init__(self, full_node, solidity_node=None, private_key=None):
40
38
41
39
self .full_node = full_node
42
40
self .solidity_node = solidity_node
43
- self .tron_node = HttpProvider (TRON_NODE )
41
+ self .tron_node = HttpProvider (config . DEFAULT_TRON_NODE )
44
42
45
43
if private_key :
46
44
self .private_key = private_key
@@ -229,7 +227,7 @@ def get_transactions_related(self, address, direction='all', limit=30, offset=0)
229
227
response .update ({'direction' : direction })
230
228
return response
231
229
232
- def get_transactions_to_address (self , address , limit = 20 , offset = 0 ):
230
+ def get_transactions_to_address (self , address , limit = 30 , offset = 0 ):
233
231
"""Query the list of transactions received by an address
234
232
235
233
Args:
@@ -243,7 +241,7 @@ def get_transactions_to_address(self, address, limit=20, offset=0):
243
241
"""
244
242
return self .get_transactions_related (address , 'to' , limit , offset )
245
243
246
- def get_transactions_from_address (self , address , limit = 20 , offset = 0 ):
244
+ def get_transactions_from_address (self , address , limit = 30 , offset = 0 ):
247
245
"""Query the list of transactions sent by an address
248
246
249
247
Args:
0 commit comments