Unverified Commit 5df44c90 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #2546 from ethereum/compiler-settings

set and get compiler state properly
parents a756977b 60fd24ec
......@@ -187,7 +187,7 @@ class CompileTab extends ViewPlugin {
}
getCompilationResult () {
return this.compileTabLogic.compiler.lastCompilationResult
return this.compileTabLogic.compiler.state.lastCompilationResult
}
// This function is used by remix-plugin
......
......@@ -24,26 +24,26 @@ class CompileTab {
this.optimize = this.queryParams.get().optimize
this.optimize = this.optimize === 'true'
this.queryParams.update({ optimize: this.optimize })
this.compiler.optimize = this.optimize
this.compiler.set('optimize', this.optimize)
this.evmVersion = this.queryParams.get().evmVersion
if (this.evmVersion === 'undefined' || this.evmVersion === 'null' || !this.evmVersion) {
this.evmVersion = null
}
this.queryParams.update({ evmVersion: this.evmVersion })
this.compiler.evmVersion = this.evmVersion
this.compiler.set('evmVersion', this.evmVersion)
}
setOptimize (newOptimizeValue) {
this.optimize = newOptimizeValue
this.queryParams.update({ optimize: this.optimize })
this.compiler.optimize = this.optimize
this.compiler.set('optimize', this.optimize)
}
setEvmVersion (newEvmVersion) {
this.evmVersion = newEvmVersion
this.queryParams.update({ evmVersion: this.evmVersion })
this.compiler.evmVersion = this.evmVersion
this.compiler.set('evmVersion', this.evmVersion)
}
/**
......@@ -51,7 +51,7 @@ class CompileTab {
* @params lang {'Solidity' | 'Yul'} ...
*/
setLanguage (lang) {
this.compiler.language = lang
this.compiler.set('language', lang)
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment