track original filepath of the contract
This commit is contained in:
parent
a7f1d3c21e
commit
433fd6f11e
|
@ -122,6 +122,7 @@ class ContractsManager {
|
|||
contract.functionHashes = compiledContract.functionHashes;
|
||||
contract.abiDefinition = compiledContract.abiDefinition;
|
||||
contract.filename = compiledContract.filename;
|
||||
contract.originalFilename = compiledContract.originalFilename || ("contracts/" + contract.filename);
|
||||
|
||||
contract.gas = (contractConfig && contractConfig.gas) || self.contractsConfig.gas || 'auto';
|
||||
|
||||
|
|
|
@ -22,6 +22,9 @@ class Solidity {
|
|||
}
|
||||
let self = this;
|
||||
let input = {};
|
||||
let solcW;
|
||||
let originalFilepath = {};
|
||||
|
||||
async.waterfall([
|
||||
function prepareInput(callback) {
|
||||
async.each(contractFiles,
|
||||
|
@ -33,6 +36,8 @@ class Solidity {
|
|||
filename = filename.replace(match, '');
|
||||
}
|
||||
|
||||
originalFilepath[filename] = file.filename;
|
||||
|
||||
file.content(function(fileContent) {
|
||||
if (!fileContent) {
|
||||
self.logger.error(__('Error while loading the content of ') + filename);
|
||||
|
@ -140,6 +145,7 @@ class Solidity {
|
|||
compiled_object[className].functionHashes = contract.evm.methodIdentifiers;
|
||||
compiled_object[className].abiDefinition = contract.abi;
|
||||
compiled_object[className].filename = filename;
|
||||
compiled_object[className].originalFilename = originalFilepath[filename];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue