pull/2990/head
Aniket-Engg 2 years ago
parent ee603532da
commit f8d0cdf820
  1. 6
      libs/remixd/src/services/truffleClient.ts

@ -62,6 +62,9 @@ export class TruffleClient extends PluginClient {
private async processArtifact () {
const folderFiles = await fs.readdir(this.buildPath)
// name of folders are file names
for (const file of folderFiles) {
if (file.endsWith('.json')) {
const compilationResult = {
input: {},
output: {
@ -71,9 +74,6 @@ export class TruffleClient extends PluginClient {
solcVersion: null,
compilationTarget: null
}
// name of folders are file names
for (const file of folderFiles) {
if (file.endsWith('.json')) {
const content = await fs.readFile(join(this.buildPath, file), { encoding: 'utf-8' })
await this.feedContractArtifactFile(file, content, compilationResult)
this.emit('compilationFinished', compilationResult.compilationTarget, { sources: compilationResult.input }, 'soljson', compilationResult.output, compilationResult.solcVersion)

Loading…
Cancel
Save