pull/5370/head
yann300 8 months ago committed by Aniket
parent d2abced3be
commit d312513731
  1. 12
      libs/remixd/src/services/foundryClient.ts

@ -171,13 +171,15 @@ export class FoundryClient extends PluginClient {
const contractName = basename(path).replace('.json', '') const contractName = basename(path).replace('.json', '')
let sourcePath = '' let sourcePath = ''
console.log('feedContractArtifactFile', contentJSON) if (contentJSON?.metadata?.settings?.compilationTarget) {
for (const key in contentJSON.metadata.settings.compilationTarget) { for (const key in contentJSON.metadata.settings.compilationTarget) {
if (contentJSON.metadata.settings.compilationTarget[key] === contractName) { if (contentJSON.metadata.settings.compilationTarget[key] === contractName) {
sourcePath = key sourcePath = key
break break
}
} }
} }
if (!sourcePath) return if (!sourcePath) return
const currentCache = cache.files[sourcePath] const currentCache = cache.files[sourcePath]

Loading…
Cancel
Save