developing
This commit is contained in:
parent
1f4510b82b
commit
a103506de9
|
@ -12,6 +12,7 @@ trc20token_info = {
|
||||||
"vip": True}
|
"vip": True}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@singleton
|
@singleton
|
||||||
class Tronscan:
|
class Tronscan:
|
||||||
def __init__(self, api_key):
|
def __init__(self, api_key):
|
||||||
|
@ -406,6 +407,8 @@ class Tronscan:
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# address = "TSKmkBbEUFefUjGSp5Vp4hd7GFW188bZQ1"
|
||||||
address = "TB592A5QwHvvcJoCmvALmzT3S9Pux91Gub"
|
address = "TB592A5QwHvvcJoCmvALmzT3S9Pux91Gub"
|
||||||
tronscan = Tronscan(api_key='cc87d361-7cd6-4f69-a57b-f0a77a213355')
|
tronscan = Tronscan(api_key='cc87d361-7cd6-4f69-a57b-f0a77a213355')
|
||||||
print(tronscan.transfer_trc20(address, trc20token_info["usdt"]["tokenId"]))
|
print(tronscan.token_trc20_transfers(limit=100,
|
||||||
|
from_address=address, to_address='TNrzRLi2ArZhiMx51zusBEHHh1qyB9Ldq2'))
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
tronscan = cc87d361-7cd6-4f69-a57b-f0a77a213355
|
tronscan = cc87d361-7cd6-4f69-a57b-f0a77a213355
|
||||||
|
|
||||||
[PaymentAddresses]
|
[PaymentAddresses]
|
||||||
usdt = TB592A5QwHvvcJoCmvALmzT3S9Pux91Gub
|
;usdt = TB592A5QwHvvcJoCmvALmzT3S9Pux91Gub
|
||||||
;usdt=TNrzRLi2ArZhiMx51zusBEHHh1qyB9Ldq2
|
usdt=TNrzRLi2ArZhiMx51zusBEHHh1qyB9Ldq2
|
||||||
|
|
||||||
;[MYSQL]
|
;[MYSQL]
|
||||||
;user = wystan
|
;user = wystan
|
||||||
|
|
|
@ -15,6 +15,7 @@ class PaymentService:
|
||||||
# return 1, 1
|
# return 1, 1
|
||||||
if end_timestamp is None:
|
if end_timestamp is None:
|
||||||
end_timestamp = current_timestamp()
|
end_timestamp = current_timestamp()
|
||||||
|
logger.debug(f'检查从{from_address}到{to_address}的转账交易信息')
|
||||||
result = self.tronscan.token_trc20_transfers(limit=100,
|
result = self.tronscan.token_trc20_transfers(limit=100,
|
||||||
from_address=from_address, to_address=to_address,
|
from_address=from_address, to_address=to_address,
|
||||||
start_timestamp=order_create_timestamp, end_timestamp=end_timestamp)
|
start_timestamp=order_create_timestamp, end_timestamp=end_timestamp)
|
||||||
|
|
|
@ -16,7 +16,7 @@ class UserService:
|
||||||
logger.debug(f'query wallet addresses by phone {phone} or email {email}')
|
logger.debug(f'query wallet addresses by phone {phone} or email {email}')
|
||||||
users = self.user_repo.get_and_update(User(name=name, phone=phone, email=email,
|
users = self.user_repo.get_and_update(User(name=name, phone=phone, email=email,
|
||||||
payment_method=payment_method))
|
payment_method=payment_method))
|
||||||
addresses = set(user.address for user in users if user.wallet_address)
|
addresses = set(user.wallet_address for user in users if user.wallet_address)
|
||||||
return list(addresses)
|
return list(addresses)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue