|
|
|
@ -8,6 +8,8 @@ const getInstrumentedVersion = require('./instrumentSolidity.js'); |
|
|
|
|
const CoverageMap = require('./coverageMap.js'); |
|
|
|
|
const defaultTruffleConfig = require('./truffleConfig.js'); |
|
|
|
|
|
|
|
|
|
const isWin = /^win/.test(process.platform); |
|
|
|
|
|
|
|
|
|
const gasLimitHex = 0xfffffffffff; // High gas block limit / contract deployment limit
|
|
|
|
|
const gasPriceHex = 0x01; // Low gas price
|
|
|
|
|
|
|
|
|
@ -111,7 +113,9 @@ class App { |
|
|
|
|
this.log('Instrumenting ', file); |
|
|
|
|
currentFile = file; |
|
|
|
|
|
|
|
|
|
const contractPath = path.resolve(file); |
|
|
|
|
const contractPath = isWin |
|
|
|
|
? path.resolve(file).split('\\').join('/') |
|
|
|
|
: path.resolve(file); |
|
|
|
|
const working = this.workingDir.substring(1); |
|
|
|
|
const canonicalPath = contractPath.split('/coverageEnv').join(working); |
|
|
|
|
const contract = fs.readFileSync(contractPath).toString(); |
|
|
|
|