|
@@ -16,6 +16,9 @@ TOKENPRICE = 'TOKENPRICE'
|
|
TOKENPRICEDICT = 'TOKENPRICEDICT'
|
|
TOKENPRICEDICT = 'TOKENPRICEDICT'
|
|
TOKENWITHDRAW = 'TOKENWITHDRAW'
|
|
TOKENWITHDRAW = 'TOKENWITHDRAW'
|
|
|
|
|
|
|
|
+DEPROCONTRACT = '0x9984086CB9d93dbe47C4e70890aAD5454bBc2518'
|
|
|
|
+DEPROPRICE = 0.01
|
|
|
|
+
|
|
#dev ali
|
|
#dev ali
|
|
#r = RedisCluster(host="r-bp1ps6my7lzg8rdhwxpi.redis.rds.aliyuncs.com", port=6379, password='Wqsd@2019', decode_responses=True, skip_full_coverage_check=True)
|
|
#r = RedisCluster(host="r-bp1ps6my7lzg8rdhwxpi.redis.rds.aliyuncs.com", port=6379, password='Wqsd@2019', decode_responses=True, skip_full_coverage_check=True)
|
|
|
|
|
|
@@ -30,6 +33,7 @@ r = RedisCluster(host=REDIS_ONLINE, port=6379, decode_responses=True, skip_full_
|
|
def getTokenList():
|
|
def getTokenList():
|
|
l = []
|
|
l = []
|
|
with open('/home/sh/token.txt') as f:
|
|
with open('/home/sh/token.txt') as f:
|
|
|
|
+ #with open('token.txt') as f:
|
|
for line in f:
|
|
for line in f:
|
|
l.append(line.strip())
|
|
l.append(line.strip())
|
|
return l
|
|
return l
|
|
@@ -62,6 +66,7 @@ def getAllPrice():
|
|
l.append(info)
|
|
l.append(info)
|
|
bnbPrice = bnb
|
|
bnbPrice = bnb
|
|
l.append({'contract':BNBCONTRACT, 'usdPrice':bnbPrice})
|
|
l.append({'contract':BNBCONTRACT, 'usdPrice':bnbPrice})
|
|
|
|
+ l.append({'contract':DEPROCONTRACT, 'usdPrice':DEPROPRICE})
|
|
r.set(TOKENPRICE, json.dumps({'tokenPrice':l}))
|
|
r.set(TOKENPRICE, json.dumps({'tokenPrice':l}))
|
|
return l
|
|
return l
|
|
|
|
|
|
@@ -69,6 +74,7 @@ def getWithdrawFees():
|
|
l = []
|
|
l = []
|
|
priceList = getAllPrice()
|
|
priceList = getAllPrice()
|
|
for i in priceList:
|
|
for i in priceList:
|
|
|
|
+ print(i)
|
|
contract = i['contract']
|
|
contract = i['contract']
|
|
withdrawFeeCount = round(WITHDRAWFEEUSD/i['usdPrice'], 18)
|
|
withdrawFeeCount = round(WITHDRAWFEEUSD/i['usdPrice'], 18)
|
|
withdrawMinCount = withdrawFeeCount * WITHDRAWCOUNTBYFEE
|
|
withdrawMinCount = withdrawFeeCount * WITHDRAWCOUNTBYFEE
|