Update contracts.js

This commit is contained in:
VoR0220 2015-10-25 13:37:57 -05:00 committed by Iuri Matias
parent 9e8ebe9cb3
commit 4b451f0290
1 changed files with 17 additions and 20 deletions

View File

@ -60,10 +60,10 @@ ContractsConfig.prototype.compileContracts = function(env) {
options = contractsConfig[className];
if (options.args == null) continue;
ref = options.args;
ref = options.args; //get arguments
for (j = 0; j < ref.length; j++) {
arg = ref[j];
if (arg[0] === "$") {
if (arg[0] === "$") { //check if they are a contract dependency
if (this.contractDependencies[className] === void 0) {
this.contractDependencies[className] = [];
}
@ -77,10 +77,8 @@ ContractsConfig.prototype.compileContracts = function(env) {
var all_compiled_contracts = {};
// compile files
for (j = 0; j < this.contractFiles.length; j++) {
contractFile = this.contractFiles[j];
compiled_contracts = this.compiler.compile(this.contractFiles);
compiled_contracts = this.compiler.compile(contractFile);
for (var className in compiled_contracts) {
var contract = compiled_contracts[className];
@ -98,7 +96,6 @@ ContractsConfig.prototype.compileContracts = function(env) {
compiled: contract
}
}
}
// TODO: move this
for(className in contractsConfig) {