Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blockColctn.aggregate([{
- "$match": {
- "number": blockNumber
- }
- },
- {
- "$project": {
- "transactions.to": "$transactions.to",
- "transaction": "$transactions",
- "transactions.hash": "$transactions.hash",
- }
- },
- {
- "$lookup": {
- "from": "token_collections",
- "localField": "transactions.to",
- "foreignField": "tokencontractaddress",
- "as": "tokenaccount"
- }
- },
- {
- "$project": {
- "total":getTotal("transactions.hash")
- }
- }])
Add Comment
Please, Sign In to add comment