Skip to content

Commit

Permalink
Merge branch master into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
BT Enterprise committed Mar 19, 2019
2 parents 899b5ff + c935eac commit cc66b77
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 9 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# ETCExplorer
# ETC Explorer

<img src="public/img/explorer-logo.png" alt="ETC Explorer logo" height="200" />

<b>Live Version: [etherhub.io](http://etherhub.io)</b>

Follow the project progress at: [ETC Block Explorer Development](https://github.com/ethereumproject/explorer)
Follow the project progress at: [ETC Block Explorer Development](https://github.com/ethereumclassic/explorer)

## Local installation

Clone the repo

`git clone https://github.com/ethereumproject/explorer`
`git clone https://github.com/ethereumclassic/explorer`

Download [Nodejs and npm](https://docs.npmjs.com/getting-started/installing-node "Nodejs install") if you don't have them

Expand Down Expand Up @@ -169,6 +171,7 @@ And explore it.
### Run

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
Expand All @@ -188,4 +191,11 @@ Enabling price conversion requires running a separate process:
`npm run price`

You can configure intervals (how often a new data point is pulled) and range (how many blocks to go back) with the following:

`RESCAN=100:7700000 node tools/stats.js` (New data point every 100 blocks. Go back 7,700,000 blocks).

## Docker installation

Set `nodeAddr` in `config.json` to `host.docker.internal`

Run `docker-compose up`
2 changes: 1 addition & 1 deletion config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"reddit": "https://www.reddit.com/r/EthereumClassic",
"twitter": "https://twitter.com/eth_classic",
"linkedin": "https://www.linkedin.com/company/ethereum-classic",
"github": "https://github.com/ethereumproject",
"github": "https://github.com/ethereumclassic",
"logo": "/img/explorer-logo.png",
"copyright": "2019 &copy; Ethereum Classic.",
"poweredbyCustom": false,
Expand Down
46 changes: 46 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3'
services:
app:
build: .
command: ./app.js
restart: always
environment:
MONGO_URI: 'mongodb://db/explorerDB'
ports:
- '3000:3000'
depends_on:
- db
sync:
build: .
command: ./tools/sync.js
restart: always
environment:
MONGO_URI: 'mongodb://db/explorerDB'
depends_on:
- db
stats:
build: .
command: ./tools/stats.js
restart: always
environment:
MONGO_URI: 'mongodb://db/explorerDB'
depends_on:
- db
price:
build: .
command: ./tools/price.js
restart: always
environment:
MONGO_URI: 'mongodb://db/explorerDB'
depends_on:
- db
richlist:
build: .
command: ./tools/richlist.js
restart: "no"
environment:
MONGO_URI: 'mongodb://db/explorerDB'
depends_on:
- db
db:
image: mongo
10 changes: 9 additions & 1 deletion public/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,13 @@
"symbol":"SATURN",
"name": "Saturn Classic",
"decimal":4,
"abi": [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"},{"indexed":false,"name":"_data","type":"bytes"}],"name":"ERC223Transfer","type":"event"}] }
"abi": [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"},{"indexed":false,"name":"_data","type":"bytes"}],"name":"ERC223Transfer","type":"event"}]
},
{
"address":"0x085b0fdf115aa9e16ae1bddd396ce1f993c52220",
"symbol":"ONEX",
"name": "ONEX Network",
"decimal":18,
"abi": [{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":"_name"}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"mint","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"_totalSupply"}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"maxTotalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":"_decimals"}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"blockNumber"}],"name":"getBlockNumber","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"chainStartTime","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"balance"}],"name":"balanceOf","inputs":[{"type":"address","name":"_owner"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"stakeStartTime","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":"_symbol"}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalInitialSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"success"}],"name":"transfer","inputs":[{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"coinAge","inputs":[{"type":"address","name":"staker"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"interest"}],"name":"annualInterest","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"success"}],"name":"transfer","inputs":[{"type":"address","name":"_to"},{"type":"uint256","name":"_value"},{"type":"bytes","name":"_data"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"stakeMinAge","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"chainStartBlockNumber","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"stakeMaxAge","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"maxMintProofOfStake","inputs":[],"constant":true},{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[]},{"type":"event","name":"Mint","inputs":[{"type":"address","name":"_address","indexed":true},{"type":"uint256","name":"_reward","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"_from","indexed":true},{"type":"address","name":"_to","indexed":true},{"type":"uint256","name":"_value","indexed":false}],"anonymous":false},{"type":"event","name":"ERC223Transfer","inputs":[{"type":"address","name":"_from","indexed":true},{"type":"address","name":"_to","indexed":true},{"type":"uint256","name":"_value","indexed":false},{"type":"bytes","name":"_data","indexed":false}],"anonymous":false}]
}
]
6 changes: 3 additions & 3 deletions public/tpl/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<h2>About</h2>
<p> {{settings.about}} </p>
<span ng-bind-html="settings.poweredbyCustom" ng-if="settings.poweredbyCustom">{{settings.poweredbyCustom}}</span>
<span ng-if="!settings.poweredbyCustom && settings.poweredbyEtcImage"><a href="https://github.com/ethereumproject/explorer" target="_blank"><img height="51px" src="{{settings.poweredbyEtcImage}}"></a></span>
<p ng-if="!settings.poweredbyCustom && !settings.poweredbyEtcImage && settings.poweredbyEtc"> Powered by <a href="https://github.com/ethereumproject/explorer" target="_blank">ETC Explorer</a> </p>
<span ng-if="!settings.poweredbyCustom && settings.poweredbyEtcImage"><a href="https://github.com/ethereumclassic/explorer" target="_blank"><img height="51px" src="{{settings.poweredbyEtcImage}}"></a></span>
<p ng-if="!settings.poweredbyCustom && !settings.poweredbyEtcImage && settings.poweredbyEtc"> Powered by <a href="https://github.com/ethereumclassic/explorer" target="_blank">ETC Explorer</a> </p>
</div>
<div class="col-md-3 col-sm-6 col-xs-12 footer-block">
<h2>Follow Us On</h2>
Expand All @@ -32,7 +32,7 @@ <h2>Follow Us On</h2>
<div ng-show="settings.symbol == 'ETC'" class="col-md-6 col-sm-12 col-xs-12 footer-block">
<h2>Help, it's Broken!</h2>
<address class="margin-bottom-40">
<br>Open an Issue: <a href="https://github.com/ethereumproject/explorer/issues">github</a>
<br>Open an Issue: <a href="https://github.com/ethereumclassic/explorer/issues">github</a>
<br> <a href="mailto:[email protected]">Email bug reports</a>
<br> <a href="https://twitter.com/eiaine">Twit</a>
</address>
Expand Down
2 changes: 1 addition & 1 deletion public/tpl/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
</a>
</li>
<li>
<a href=" https://ethereumproject.github.io/etherwallet/ " target="_blank">
<a href=" https://ethereumclassic.github.io/etherwallet/ " target="_blank">
<i class="fa fa-folder-open"></i>
<span class="title" data-toggle="tooltip" title="Client Side JS ETC Wallet"> ClassicEtherWallet.com</span>
</a>
Expand Down

0 comments on commit cc66b77

Please sign in to comment.