From 5338614f93a6872a9604c2e2b13cf67d62b966a4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 11 Jun 2024 14:15:28 +0200 Subject: [PATCH] linting --- libs/remixd/src/services/foundryClient.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/remixd/src/services/foundryClient.ts b/libs/remixd/src/services/foundryClient.ts index e652f6624d..0cde4a41fb 100644 --- a/libs/remixd/src/services/foundryClient.ts +++ b/libs/remixd/src/services/foundryClient.ts @@ -116,7 +116,7 @@ export class FoundryClient extends PluginClient { contracts: {}, sources: {} }, - inputSources: { sources: {}, target: ''}, + inputSources: { sources: {}, target: '' }, solcVersion: null, compilationTarget: null } @@ -158,7 +158,7 @@ export class FoundryClient extends PluginClient { } async readContract(contractFolder, compilationResultPart, cache) { - const files = await fs.readdir(contractFolder) + const files = await fs.readdir(contractFolder) for (const file of files) { const path = join(contractFolder, file) const content = await fs.readFile(path, { encoding: 'utf-8' }) @@ -172,7 +172,7 @@ export class FoundryClient extends PluginClient { const contractName = basename(path).replace('.json', '') let sourcePath = '' - for (let key in contentJSON.metadata.settings.compilationTarget) { + for (const key in contentJSON.metadata.settings.compilationTarget) { if (contentJSON.metadata.settings.compilationTarget[key] === contractName) { sourcePath = key break @@ -206,7 +206,6 @@ export class FoundryClient extends PluginClient { console.log('\x1b[32m%s\x1b[0m', 'sources input not found, please update Foundry to the latest version.') } - compilationResultPart.compilationTarget = sourcePath // extract data if (!compilationResultPart.output['sources'][sourcePath]) compilationResultPart.output['sources'][sourcePath] = {}