Purpose: To Create Multiple XDC Network Explorer.
A blockchain explorer is a piece of software that uses API and blockchain nodes to draw various data from a blockchain and then uses a database to arrange
the searched data and to present the data to the user in a searchable format. (ref)
XinFin.Network Explorer allows you to explore and search the XDC blockchain for transactions, addresses, tokens, prices, smart contracts, and other activities taking place on XinFin Network (XDC).
Coinmarketcap digital guide on Blockchain Explorer
https://explorer.xinfin.network
https://www.blockchain.com/explorer
https://etherscan.io
https://www.blockchain.com/explorer
Setup Explorer Website: Create a new website with various search features like wallet address, token address, transaction reference with the ability to display transactions or smart contracts details of
XinFin Network. All features should be accessible using various XDC Network node API or frontend API.
XDC Network's Node HTTP API, SDK Frontend APIs and Developer tool kit: https://mycontract.co/
Basic Explorer Installation process: Clone the repo
Download Nodejs and npm if you don't have them.
Install mongodb or other backend Database System.
This will fetch and parse the entire blockchain.
Setup your configuration file: cp config.example.json config.json
Edit config.json
as you wish
Basic settings:
{
"nodeAddr": "localhost",
"gethPort": 8545,
"startBlock": 0,
"endBlock": "latest",
"quiet": true,
"syncAll": true,
"patch": true,
"patchBlocks": 100,
"CMCKey": abcd,
"settings": {
"symbol": "XDC",
"name": "XDC Network",
"title": "XDC Network Block Explorer",
"author": "XDC Network"
}
}
nodeAddr
Your node API RPC address.
gethPort
Your node API RPC port.
startBlock
This is the start block of the blockchain, should always be 0 if you want to sync the whole CLO blockchain.
endBlock
This is usually the 'latest'/'newest' block in the blockchain, this value gets updated automatically, and will be used to patch missing blocks if the whole app goes down.
quiet
Suppress some messages. (admittedly still not quiet)
syncAll
If this is set to true at the start of the app, the sync will start syncing all blocks from lastSync, and if lastSync is 0 it will start from whatever the endBlock or latest block in the
blockchain is.
patch
If set to true and below value is set, a sync will be iterated through the # of blocks specified.
patchBlocks
If the patch is set to true, the amount of block specified will be check from the latest one.
The below will start both the web-GUI and sync.js (which populates MongoDB with blocks/transactions). npm start
You can leave sync.js running without app.js and it will sync and grab blocks based on config.json parameters node ./tools/sync.js
You can configure intervals (how often a new data point is pulled) and range (how many blocks to go back) with the following: RESCAN=1000:100000 node tools/stats.js
(New data point every 1,000
blocks. Go back 100,000 blocks).
If you are having problems with Setup, the first step is to collect more information to accurately characterize the problem. From there, it can be easier to figure out a root cause and a fix.
Please drop a message with all possible detail and screenshot at the Community Support.
Telegram Community: https://t.me/XinFinDevelopers
Slack Community: https://xinfin-public.slack.com/messages/CELR2M831/
Reference source code: https://github.com/XinFinOrg/XDCScan
https://github.com/binance-chain/bsc-explorer
https://github.com/poanetwork/chain-explorer
https://github.com/bing-chou/etherscan-explorer
https://github.com/nebulasio/explorer/tree/develop/explorer-front
https://github.com/hyperledger/blockchain-explorer
Please fill up the bounty form and pre-approve your bounty budget from the link: https://xinfin.org/bounty
- Weekly or Monthly fixed Advertisement income from the XDC Network's ecosystem tokens or DApps like TradeFinex, MyContract.co, Blockdegree, XcelTrip, etc.
- Pay per view based advertisement revenue.