Guest User

Untitled

a guest
Jun 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. blockColctn.aggregate([{
  2. "$match": {
  3. "number": blockNumber
  4. }
  5.  
  6. },
  7. {
  8. "$project": {
  9. "transactions.to": "$transactions.to",
  10. "transaction": "$transactions",
  11. "transactions.hash": "$transactions.hash",
  12.  
  13.  
  14. }
  15. },
  16. {
  17. "$lookup": {
  18. "from": "token_collections",
  19. "localField": "transactions.to",
  20. "foreignField": "tokencontractaddress",
  21. "as": "tokenaccount"
  22. }
  23. },
  24. {
  25. "$project": {
  26. "total":getTotal("transactions.hash")
  27. }
  28. }])
Add Comment
Please, Sign In to add comment