|
|
@ -68,7 +68,6 @@ export class HardhatClient extends PluginClient { |
|
|
|
const contractFilePath = join(this.buildPath, file) |
|
|
|
const contractFilePath = join(this.buildPath, file) |
|
|
|
const stat = await fs.stat(contractFilePath) |
|
|
|
const stat = await fs.stat(contractFilePath) |
|
|
|
if (!stat.isDirectory()) continue |
|
|
|
if (!stat.isDirectory()) continue |
|
|
|
console.log('pp ', contractFilePath) |
|
|
|
|
|
|
|
const files = await fs.readdir(contractFilePath) |
|
|
|
const files = await fs.readdir(contractFilePath) |
|
|
|
const compilationResult = { |
|
|
|
const compilationResult = { |
|
|
|
input: {}, |
|
|
|
input: {}, |
|
|
@ -89,7 +88,7 @@ export class HardhatClient extends PluginClient { |
|
|
|
compilationResult.target = jsonStd.sourceName |
|
|
|
compilationResult.target = jsonStd.sourceName |
|
|
|
|
|
|
|
|
|
|
|
// this is the full compilation result
|
|
|
|
// this is the full compilation result
|
|
|
|
console.log('processing hardhat artifact', file) |
|
|
|
console.log('Processing Hardhat artifact for file: ', file) |
|
|
|
const path = join(contractFilePath, jsonDbg.buildInfo) |
|
|
|
const path = join(contractFilePath, jsonDbg.buildInfo) |
|
|
|
const content = await fs.readFile(path, { encoding: 'utf-8' }) |
|
|
|
const content = await fs.readFile(path, { encoding: 'utf-8' }) |
|
|
|
|
|
|
|
|
|
|
@ -102,7 +101,7 @@ export class HardhatClient extends PluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this.warnLog) { |
|
|
|
if (!this.warnLog) { |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|
this.call('terminal', 'log', 'receiving compilation result from hardhat') |
|
|
|
this.call('terminal', 'log', 'receiving compilation result from Hardhat') |
|
|
|
this.warnLog = true |
|
|
|
this.warnLog = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -121,10 +120,10 @@ export class HardhatClient extends PluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async sync () { |
|
|
|
async sync () { |
|
|
|
console.log('syncing from hardhat') |
|
|
|
console.log('syncing from Hardhat') |
|
|
|
this.processArtifact() |
|
|
|
this.processArtifact() |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|
this.call('terminal', 'log', 'synced with hardhat') |
|
|
|
this.call('terminal', 'log', 'synced with Hardhat') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async feedContractArtifactFile (artifactContent, compilationResultPart) { |
|
|
|
async feedContractArtifactFile (artifactContent, compilationResultPart) { |
|
|
|