Learning about Blockchain explorer Mongodb

  1. Setup a crypto coin blockchain explorer: I deployed a iquidus explorer.
  2. Remember some useful sql for Mongodb:

#startup

sudo service mongod start

# connect console commands

#mongo

> show dbs;

> use tempdb;

> db.dropDatabase();
{ "dropped" : "tempdb", "ok" : 1 }

List 100 richest holders:

db.addresses.aggregate([{ $group: { _id: "$a_id", total: { $sum: "$balance" } } },{ $sort: { total: -1 } },{ $limit : 100 }]);

      Total current supply coins:

/ext/getmoneysupply
2541450840.4215493
coin-cli gettxoutsetinfo
"total_amount": 3286598798.90982342