Skip to content

Commit

Permalink
Merge pull request #4309 from ethereum/fix_parser
Browse files Browse the repository at this point in the history
fix parser: remappings
  • Loading branch information
yann300 authored Dec 6, 2023
2 parents 073cbf8 + 5ae1e63 commit c4f482a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ export default class CodeParserCompiler {
this.compiler.set('runs', state.runs)
this.compiler.set('useFileConfiguration', true)
this.compiler.set('compilerRetriggerMode', CompilerRetriggerMode.retrigger)

if (await this.plugin.call('fileManager', 'exists','remappings.txt')) {
const remappings = await this.plugin.call('fileManager', 'readFile','remappings.txt')
this.compiler.set('remappings', remappings.split('\n').filter(Boolean))
} else {
this.compiler.set('remappings', [])
}

const configFileContent = {
"language": "Solidity",
"settings": {
Expand Down

0 comments on commit c4f482a

Please sign in to comment.