@@ -184,87 +184,29 @@ export class CompileTabLogic {
184184 this . api . saveCurrentFile ( )
185185 if ( this . api . getFileManagerMode ( ) === 'localhost' || this . api . isDesktop ( ) ) {
186186 if ( externalCompType === 'hardhat' ) {
187- /*
188- => let the framework to use it's default config file
189- const { currentVersion, optimize, runs } = this.compiler.state
190- if (currentVersion) {
191- const fileContent = `module.exports = {
192- solidity: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}',
193- settings: {
194- optimizer: {
195- enabled: ${optimize},
196- runs: ${runs}
197- }
198- }
199- }
200- `
201- const configFilePath = 'remix-compiler.config.js'
202- this.api.writeFile(configFilePath, fileContent)
203- */
204187 if ( window . _matomoManagerInstance ) {
205188 window . _matomoManagerInstance . trackEvent ( 'compiler' , 'runCompile' , 'compileWithHardhat' )
206189 }
207190 this . api . compileWithHardhat ( ) . then ( ( result ) => {
208191 } ) . catch ( ( error ) => {
209192 this . api . logToTerminal ( { type : 'error' , value : error } )
210193 } )
211- // }
212194 } else if ( externalCompType === 'truffle' ) {
213- /*
214- => let the framework to use it's default config file
215- const { currentVersion, optimize, runs, evmVersion } = this.compiler.state
216- if (currentVersion) {
217- const fileContent = `module.exports = {
218- compilers: {
219- solc: {
220- version: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}',
221- settings: {
222- optimizer: {
223- enabled: ${optimize},
224- runs: ${runs},
225- },
226- evmVersion: ${evmVersion}
227- }
228- }
229- }
230- }`
231- const configFilePath = 'remix-compiler.config.js'
232- this.api.writeFile(configFilePath, fileContent)
233- */
234195 if ( window . _matomoManagerInstance ) {
235196 window . _matomoManagerInstance . trackEvent ( 'compiler' , 'runCompile' , 'compileWithTruffle' )
236197 }
237198 this . api . compileWithTruffle ( ) . then ( ( result ) => {
238199 } ) . catch ( ( error ) => {
239200 this . api . logToTerminal ( { type : 'error' , value : error } )
240201 } )
241- // }
242202 } else if ( externalCompType === 'foundry' ) {
243- /*
244- => let the framework to use it's default config file
245- const { currentVersion, optimize, runs } = this.compiler.state
246- if (currentVersion) {
247- const fileContent = `module.exports = {
248- solidity: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}',
249- settings: {
250- optimizer: {
251- enabled: ${optimize},
252- runs: ${runs}
253- }
254- }
255- }
256- `
257- const configFilePath = 'remix-compiler.config.js'
258- this.api.writeFile(configFilePath, fileContent)
259- */
260203 if ( window . _matomoManagerInstance ) {
261204 window . _matomoManagerInstance . trackEvent ( 'compiler' , 'runCompile' , 'compileWithFoundry' )
262205 }
263206 this . api . compileWithFoundry ( ) . then ( ( result ) => {
264207 } ) . catch ( ( error ) => {
265208 this . api . logToTerminal ( { type : 'error' , value : error } )
266209 } )
267- // }
268210 }
269211 }
270212 if ( externalCompType === 'remix' || ! externalCompType ) {
0 commit comments