Skip to content

Commit af84750

Browse files
committed
increased limit and update config
1 parent 1c99a71 commit af84750

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tronapi/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# Tron nodes
44
DEFAULT_FULL_NODE = "https://api.trongrid.io"
55
DEFAULT_SOLIDITY_NODE = "https://api.trongrid.io"
6+
DEFAULT_TRON_NODE = 'https://server.tron.network'

tronapi/tron.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@
2121
import base58
2222
import math
2323

24+
from tronapi import config
2425
from tronapi.crypto import utils
2526
from tronapi.provider import HttpProvider
2627

27-
# Server API from tron.network
28-
TRON_NODE = 'https://server.tron.network'
29-
3028

3129
class Tron:
3230

@@ -40,7 +38,7 @@ def __init__(self, full_node, solidity_node=None, private_key=None):
4038

4139
self.full_node = full_node
4240
self.solidity_node = solidity_node
43-
self.tron_node = HttpProvider(TRON_NODE)
41+
self.tron_node = HttpProvider(config.DEFAULT_TRON_NODE)
4442

4543
if private_key:
4644
self.private_key = private_key
@@ -229,7 +227,7 @@ def get_transactions_related(self, address, direction='all', limit=30, offset=0)
229227
response.update({'direction': direction})
230228
return response
231229

232-
def get_transactions_to_address(self, address, limit=20, offset=0):
230+
def get_transactions_to_address(self, address, limit=30, offset=0):
233231
"""Query the list of transactions received by an address
234232
235233
Args:
@@ -243,7 +241,7 @@ def get_transactions_to_address(self, address, limit=20, offset=0):
243241
"""
244242
return self.get_transactions_related(address, 'to', limit, offset)
245243

246-
def get_transactions_from_address(self, address, limit=20, offset=0):
244+
def get_transactions_from_address(self, address, limit=30, offset=0):
247245
"""Query the list of transactions sent by an address
248246
249247
Args:

0 commit comments

Comments
 (0)