Skip to content

Commit f8d0cdf

Browse files
committed
initialize
1 parent ee60353 commit f8d0cdf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

libs/remixd/src/services/truffleClient.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ export class TruffleClient extends PluginClient {
6262

6363
private async processArtifact () {
6464
const folderFiles = await fs.readdir(this.buildPath)
65-
const compilationResult = {
66-
input: {},
67-
output: {
68-
contracts: {},
69-
sources: {}
70-
},
71-
solcVersion: null,
72-
compilationTarget: null
73-
}
7465
// name of folders are file names
7566
for (const file of folderFiles) {
7667
if (file.endsWith('.json')) {
68+
const compilationResult = {
69+
input: {},
70+
output: {
71+
contracts: {},
72+
sources: {}
73+
},
74+
solcVersion: null,
75+
compilationTarget: null
76+
}
7777
const content = await fs.readFile(join(this.buildPath, file), { encoding: 'utf-8' })
7878
await this.feedContractArtifactFile(file, content, compilationResult)
7979
this.emit('compilationFinished', compilationResult.compilationTarget, { sources: compilationResult.input }, 'soljson', compilationResult.output, compilationResult.solcVersion)

0 commit comments

Comments
 (0)