AvalonMonoScripts/getDTubeTransfersover1k.js

30 lines
580 B
JavaScript
Raw Normal View History

2021-09-08 11:14:22 +00:00
mongo = require("./mongoHelp.js")
agg = [
{
'$unwind': {
'path': '$txs',
'preserveNullAndEmptyArrays': true
}
}, {
'$match': {
'txs.sender': 'dtube'
}
}, {
'$match': {
'txs.type': 3
}
}, {
'$match': {
'txs.data.amount': {
'$gt': 10000
}
}
}
]
mongo.aggregate('avalon5', 'blocks', agg).then(res => {
res.forEach(element => {
console.log(element.timestamp, element.txs.data.receiver,element.txs.data.amount,element.txs.data.memo)
})
})