Skip to content
Permalink
Browse files

fetch bytecode for token

  • Loading branch information...
elaineo committed Mar 20, 2017
1 parent cf0a8bc commit 47142544993098cad4a4b88dfe77f22b849aa0bd
Showing with 4 additions and 2 deletions.
  1. +2 −1 public/js/controllers/TokenController.js
  2. +2 −1 routes/token.js
@@ -20,6 +20,7 @@ angular.module('BlocksApp').controller('TokenController', function($stateParams,
console.log(data)
$scope.token = data;
$scope.token.address = address;
$scope.addr = {"bytecode": data.bytecode};
});

$scope.form = {};
@@ -41,7 +42,7 @@ angular.module('BlocksApp').controller('TokenController', function($stateParams,
}).success(function(data) {
console.log(data)
$scope.showTokens = true;
$scope.dao.tokens = data.tokens;
$scope.token.tokens = data.tokens;
});
} else
$scope.errors.address = "Invalid Address";
@@ -33,7 +33,8 @@ module.exports = function(req, res){
var tokenData = {
"balance": actualBalance,
"total_supply": totalSupply,
"count": count
"count": count,
"bytecode": eth.getCode(contractAddress)
}
res.write(JSON.stringify(tokenData));
res.end();

0 comments on commit 4714254

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