You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AvalonMonoScripts/getDTubeTransfersover1k.js

30 lines
580 B

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)
})
})