A BERYCOIN blockchain explorer web application service for Berycoincore Node using the BERYCOIN API.
-
Install nvm https://github.com/creationix/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash source ~/.bashrc nvm i v6 nvm use v6
-
Install mongo https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list sudo apt-get update sudo apt-get install -y mongodb-orgecho "mongodb-org hold" | sudo dpkg --set-selections echo "mongodb-org-server hold" | sudo dpkg --set-selections echo "mongodb-org-shell hold" | sudo dpkg --set-selections echo "mongodb-org-mongos hold" | sudo dpkg --set-selections echo "mongodb-org-tools hold" | sudo dpkg --set-selectionssudo service mongod start -
Install berycoin-bitcore https://github.com/berycoin-project/berycoin-bitcore - with ZMQ !
# with ZMQ sudo apt-get install libzmq3-dev sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev sudo apt-get install software-properties-common sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install libdb4.8-dev libdb4.8++-dev # If you want to build the Qt GUI: sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler qrencode git clone https://github.com/berycoin-project/berycoin-bitcore --recursive cd berycoin-bitcore cd src/cpp-ethereum git checkout develop cd .. cd .. # Note autogen will prompt to install some more dependencies if needed ./autogen.sh ./configure make -j4
-
Install berycoincore-node
npm i https://github.com/berycoin-project/berycoincore-node.git#master $(npm bin)/berycoincore-node create mynode cd mynode $(npm bin)/berycoincore-node install https://github.com/berycoin-project/insight-api.git#master $(npm bin)/berycoincore-node install https://github.com/berycoin-project/berycoin-explorer.git#master
-
Edit berycoincore-node.json
{ "network": "livenet", "port": 3001, "services": [ "berycoind", "berycoin-insight-api", "berycoin-explorer", "web" ], "servicesConfig": { "berycoin-explorer": { "apiPrefix": "berycoin-insight-api", "routePrefix": "", "nodemapLink": "https://berycoin.com/en/nodemap" }, "berycoin-insight-api": { "routePrefix": "berycoin-insight-api", "rateLimiterOptions": { "whitelist": [ "123.456.12.34", "::ffff:123.456.12.34" ], "whitelistLimit": 9999999, "limit": 200, "interval": 60000, "banInterval": 3600000 }, "db": { "host": "127.0.0.1", "port": "27017", "database": "berycoin-api-livenet", "user": "", "password": "" }, "erc20": { "updateFromBlockHeight": 0 } }, "berycoind": { "spawn": { "datadir": "/home/crypto/.berycoin", "exec": "/home/crypto/berycoin-bitcore/src/berycoind" } } } } -
Edit berycoin.conf
server=1 whitelist=127.0.0.1 txindex=1 addressindex=1 timestampindex=1 spentindex=1 zmqpubrawtx=tcp://127.0.0.1:28332 zmqpubhashblock=tcp://127.0.0.1:28332 rpcallowip=127.0.0.1 rpcuser=user rpcpassword=password rpcport=8332 reindex=1 gen=0 addrindex=1 logevents=1 -
Run Node
$(npm bin)/berycoincore-node start -
Open a web browser to
http://localhost:3001orhttp://localhost:3001/insight-api
To run Insight UI locally in development mode:
Install bower dependencies:
$ bower install
To compile and minify the web application's assets:
$ grunt compile
There is a convenient Gruntfile.js for automation during editing the code
$ grunt
Insight UI uses angular-gettext for multilanguage support.
To enable a text to be translated, add the translate directive to html tags. See more details here. Then, run:
grunt compile
This action will create a template.pot file in po/ folder. You can open it with some PO editor (Poedit). Read this guide to learn how to edit/update/import PO files from a generated POT file. PO file will be generated inside po/ folder.
If you make new changes, simply run grunt compile again to generate a new .pot template and the angular javascript js/translations.js. Then (if use Poedit), open .po file and choose update from POT File from Catalog menu.
Finally changes your default language from public/src/js/config
gettextCatalog.currentLanguage = 'es';
This line will take a look at any *.po files inside po/ folder, e.g. po/es.po, po/nl.po. After any change do not forget to run grunt compile.
For more details about the BERYCOIN API configuration and end-points, go to BERYCOIN API.
Contributions and suggestions are welcomed at the Explorer GitHub repository.
(The MIT License)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.