adding more Token count and Smart Contract count to getSystemData api
This commit is contained in:
parent
96232e9457
commit
6ee599af68
@ -813,6 +813,8 @@ async def systemData():
|
|||||||
conn = sqlite3.connect(os.path.join(dbfolder, 'system.db'))
|
conn = sqlite3.connect(os.path.join(dbfolder, 'system.db'))
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
tokenAddressCount = c.execute('select count(distinct tokenAddress) from tokenAddressMapping').fetchall()[0][0]
|
tokenAddressCount = c.execute('select count(distinct tokenAddress) from tokenAddressMapping').fetchall()[0][0]
|
||||||
|
tokenCount = c.execute('select count(distinct token) from tokenAddressMapping').fetchall()[0][0]
|
||||||
|
contractCount = c.execute('select count(distinct contractName) from contractParticipantMapping').fetchall()[0][0]
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
# query for total number of validated blocks
|
# query for total number of validated blocks
|
||||||
@ -822,7 +824,7 @@ async def systemData():
|
|||||||
validatedTransactionCount = c.execute('select count(distinct transactionHash) from latestTransactions').fetchall()[0][0]
|
validatedTransactionCount = c.execute('select count(distinct transactionHash) from latestTransactions').fetchall()[0][0]
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
return jsonify(systemAddressCount=tokenAddressCount, systemBlockCount=validatedBlockCount, systemTransactionCount=validatedTransactionCount ,result='ok')
|
return jsonify(systemAddressCount=tokenAddressCount, systemBlockCount=validatedBlockCount, systemTransactionCount=validatedTransactionCount , systemSmartContractCount=contractCount, systemTokenCount=tokenCount, result='ok')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user