Added events to graph and fixed problems in IDE
This commit is contained in:
parent
403f2daee2
commit
7dcae55b8b
|
@ -33,15 +33,22 @@ class GraphGenerator {
|
|||
for(let i = 0; i < this.engine.contractsManager.contracts[contract].abiDefinition.length; i++){
|
||||
switch(this.engine.contractsManager.contracts[contract].abiDefinition[i].type){
|
||||
case 'fallback':
|
||||
contractLabel += "«fallback»()" + '\\l';
|
||||
contractLabel += "«fallback»()\\l";
|
||||
break;
|
||||
case 'constructor':
|
||||
case 'constructor':
|
||||
contractLabel += "«constructor»(";
|
||||
for(let j = 0; j < this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs.length; j++){
|
||||
contractLabel += (j == 0 ? "" : ", ") + this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs[j].type;
|
||||
}
|
||||
contractLabel += ")\\l";
|
||||
break;
|
||||
case 'event':
|
||||
contractLabel += "«event»" + this.engine.contractsManager.contracts[contract].abiDefinition[i].name + "(";
|
||||
for(let j = 0; j < this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs.length; j++){
|
||||
contractLabel += (j == 0 ? "" : ", ") + this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs[j].type;
|
||||
}
|
||||
contractLabel += ")\\l";
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -54,23 +61,21 @@ class GraphGenerator {
|
|||
}
|
||||
|
||||
|
||||
contractString += `${id}[label = "{${contractLabel}}"]`
|
||||
contractString += "\n";
|
||||
contractString += `${id}[label = "{${contractLabel}}"]\n`;
|
||||
|
||||
}
|
||||
|
||||
for (let c in this.engine.contractsManager.contractDependencies){
|
||||
let contractDependencies = Array.from(new Set(this.engine.contractsManager.contractDependencies[c]));
|
||||
contractDependencies.forEach(function(d){
|
||||
if(idMapping[c] !== undefined && idMapping[d] !== undefined){
|
||||
relationshipString += `${idMapping[d]}->${idMapping[c]}[constraint=true, arrowtail=diamond]`
|
||||
relationshipString += "\n";
|
||||
relationshipString += `${idMapping[d]}->${idMapping[c]}[constraint=true, arrowtail=diamond]\n`;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (let c in contractInheritance){
|
||||
relationshipString += `${idMapping[contractInheritance[c]]}->${idMapping[c]}`
|
||||
relationshipString += "\n";
|
||||
relationshipString += `${idMapping[contractInheritance[c]]}->${idMapping[c]}\n`;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -186,11 +186,6 @@ class Embark {
|
|||
}
|
||||
|
||||
graph(options) {
|
||||
|
||||
|
||||
|
||||
let self = this;
|
||||
|
||||
options.onlyCompile = true;
|
||||
|
||||
let engine = new Engine({
|
||||
|
|
Loading…
Reference in New Issue