diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf81c83 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM iojs +ADD app /app +ADD .bowerrc / +ADD bower.json / +ADD karma.conf.js / +ADD package.json / +WORKDIR / +RUN npm install +ADD selectRpcAndRun.sh / +CMD /selectRpcAndRun.sh + diff --git a/app/scripts/controllers/blockInfosController.js b/app/scripts/controllers/blockInfosController.js index 6ef2207..aa49962 100644 --- a/app/scripts/controllers/blockInfosController.js +++ b/app/scripts/controllers/blockInfosController.js @@ -100,12 +100,19 @@ angular.module('ethExplorer') input: result.input, value: result.value } - $scope.$apply( - $scope.transactions.push(transaction) - ) - }) + + web3.eth.getTransactionReceipt(result.hash, function (err2, receipt) { + if(!err2) { + for (var attrname in receipt) { transaction[attrname] = receipt[attrname]; } + } + + $scope.$apply( + $scope.transactions.push(transaction) + ); + }); + }); } - }) + }); function hex2a(hexx) { diff --git a/app/scripts/controllers/transactionInfosController.js b/app/scripts/controllers/transactionInfosController.js index 468ceae..8deaf37 100644 --- a/app/scripts/controllers/transactionInfosController.js +++ b/app/scripts/controllers/transactionInfosController.js @@ -30,6 +30,8 @@ angular.module('ethExplorer') } $scope.from = result.from; $scope.gas = result.gas; + $scope.gasUsed = result.gasUsed; + $scope.contractAddress = result.contractAddress; $scope.gasPrice = result.gasPrice.c[0] + " WEI"; $scope.hash = result.hash; $scope.input = result.input; // that's a string @@ -68,7 +70,12 @@ angular.module('ethExplorer') web3.eth.getTransaction($scope.txId,function(error, result) { if(!error){ - deferred.resolve(result); + web3.eth.getTransactionReceipt($scope.txId,function(err2, receipt) { + if(!err2) { + for (var attrname in receipt) { result[attrname] = receipt[attrname]; } + } + deferred.resolve(result); + }); } else{ deferred.reject(error); diff --git a/app/views/blockInfos.html b/app/views/blockInfos.html index 03f8339..11dca38 100644 --- a/app/views/blockInfos.html +++ b/app/views/blockInfos.html @@ -90,9 +90,17 @@