mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-08 13:25:17 +00:00
track original filepath of the contract
This commit is contained in:
parent
d9f7a94eea
commit
44c56e6f22
@ -115,6 +115,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';
|
||||
|
||||
|
@ -21,6 +21,9 @@ class Solidity {
|
||||
}
|
||||
let self = this;
|
||||
let input = {};
|
||||
let solcW;
|
||||
let originalFilepath = {};
|
||||
|
||||
async.waterfall([
|
||||
function prepareInput(callback) {
|
||||
async.each(contractFiles,
|
||||
@ -32,6 +35,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);
|
||||
@ -122,6 +127,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…
x
Reference in New Issue
Block a user