Skip to content
Permalink
Browse files

add transaction count

  • Loading branch information...
elaineo committed Mar 20, 2017
1 parent e1d0f78 commit e1cf9cadd2f64fbff10b1696e75f9f8e6aca8755
Showing with 6 additions and 4 deletions.
  1. +3 −3 public/views/token.html
  2. +3 −1 routes/token.js
@@ -6,7 +6,7 @@
<div class="col-md-6 center">
<div >
<span class="eth-stat-title">
{{ token.balance | number: 10 }} </span><br>
{{ token.balance | number: 10 }} ETC</span><br>
<span class="eth-stat-text">
{{ token.name }} Balance
</span><br>
@@ -34,8 +34,8 @@
</div>
<div class="margin-top-20">
<span class="eth-stat-text">Contract Creator</span><br>
<a href="/addr/{{token.creator}}">{{token.creator}}.substr(0,24)}}...</a> at txn
<a href="/tx/{{token.transaction}}">{{token.transaction}}.substr(0,24)}}...</a>
<a href="/addr/{{token.creator}}">{{token.creator.substr(0,24)}}...</a> at txn
<a href="/tx/{{token.transaction}}">{{token.transaction.substr(0,24)}}...</a>
</div>
<div class="margin-top-20">
<span class="eth-stat-text">Token Address</span><br>
@@ -29,9 +29,11 @@ module.exports = function(req, res){
actualBalance = etherUnits.toEther(actualBalance, 'wei');
var totalSupply = Token.totalSupply();
totalSupply = etherUnits.toEther(totalSupply, 'wei')*100;
var count = web3.eth.getTransactionCount(contractAddress);
var tokenData = {
"balance": actualBalance,
"total_supply": totalSupply
"total_supply": totalSupply,
"count": count
}
res.write(JSON.stringify(tokenData));
res.end();

0 comments on commit e1cf9ca

Please sign in to comment.
You can’t perform that action at this time.