1
This commit is contained in:
parent
9406bf81c3
commit
1d1d06a766
@ -17,14 +17,17 @@ stat = {
|
|||||||
'nft_total': 0,
|
'nft_total': 0,
|
||||||
'nft_mint': 0,
|
'nft_mint': 0,
|
||||||
'bindBox': {
|
'bindBox': {
|
||||||
'hold': 0,
|
'user_hold': 0,
|
||||||
'open': 0
|
'open': 0,
|
||||||
|
'total': 0,
|
||||||
|
'merchant_hold': 0
|
||||||
},
|
},
|
||||||
'nft_rank': [
|
'nft_rank': [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
EMPTY_ADDRESS = '0x000000000000000000000000000000000'
|
EMPTY_ADDRESS = '0x0000000000000000000000000000000000000000'
|
||||||
|
MERCHANT_ADDRESS = '0x14ea40648fc8c1781d19363f5b9cc9a877ac2469'.lower()
|
||||||
|
|
||||||
def exportMintTable():
|
def exportMintTable():
|
||||||
rows = []
|
rows = []
|
||||||
@ -68,16 +71,15 @@ def statData():
|
|||||||
rawData['event'] == 'Transfer':
|
rawData['event'] == 'Transfer':
|
||||||
if rawData['returnValues']['from'] == EMPTY_ADDRESS:
|
if rawData['returnValues']['from'] == EMPTY_ADDRESS:
|
||||||
stat['nft_total'] += 1
|
stat['nft_total'] += 1
|
||||||
|
stat['bindBox']['total'] += 1
|
||||||
if rawData['returnValues']['to'] == EMPTY_ADDRESS:
|
if rawData['returnValues']['to'] == EMPTY_ADDRESS:
|
||||||
stat['bindBox']['open'] += 1
|
stat['bindBox']['open'] += 1
|
||||||
#end for
|
#end for
|
||||||
|
stat['bindBox']['user_hold'] = stat['bindBox']['total'] - stat['bindBox']['open']
|
||||||
for row in nftTable:
|
for row in nftTable:
|
||||||
try:
|
if row['owner_address'] != EMPTY_ADDRESS:
|
||||||
if row['owner_address'] != EMPTY_ADDRESS:
|
stat['nft_total'] += 1
|
||||||
stat['nft_total'] += 1
|
stat['nft_mint'] += 1
|
||||||
stat['nft_mint'] += 1
|
|
||||||
except Exception as e:
|
|
||||||
print(row)
|
|
||||||
print(json.dumps(stat))
|
print(json.dumps(stat))
|
||||||
|
|
||||||
def loadData():
|
def loadData():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user