|
|
|
@ -2,10 +2,7 @@ import { PluginClient } from "@remixproject/plugin"; |
|
|
|
|
import { createClient } from "@remixproject/plugin-webview"; |
|
|
|
|
import { CompilerApiMixin } from './compiler-api' |
|
|
|
|
import { ICompilerApi } from '@remix-project/remix-lib-ts' |
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
import { CompileTabLogic } from '@remix-ui/solidity-compiler' |
|
|
|
|
======= |
|
|
|
|
>>>>>>> 49c62946c (better org of types) |
|
|
|
|
|
|
|
|
|
const profile = { |
|
|
|
|
name: 'solidity', |
|
|
|
@ -26,7 +23,6 @@ const defaultAppParameters = { |
|
|
|
|
includeNightlies: false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
const defaultCompilerParameters = { |
|
|
|
|
runs: '200', |
|
|
|
|
optimize: false, |
|
|
|
@ -34,44 +30,6 @@ const defaultCompilerParameters = { |
|
|
|
|
evmVersion: null, // compiler default
|
|
|
|
|
language: 'Solidity' |
|
|
|
|
} |
|
|
|
|
======= |
|
|
|
|
export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements ICompilerApi { |
|
|
|
|
// interface matches libs/remix-ui/solidity-compiler/types/index.ts : ICompilerApi
|
|
|
|
|
currentFile: string |
|
|
|
|
contractMap: { |
|
|
|
|
file: string |
|
|
|
|
} | Record<string, any> |
|
|
|
|
compileErrors: any |
|
|
|
|
compileTabLogic: any |
|
|
|
|
contractsDetails: Record<string, any> |
|
|
|
|
configurationSettings: ConfigurationSettings |
|
|
|
|
|
|
|
|
|
setHardHatCompilation: (value: boolean) => void |
|
|
|
|
getParameters: () => ConfigurationSettings |
|
|
|
|
setParameters: (params: Partial<ConfigurationSettings>) => void |
|
|
|
|
setCompilerConfig: (settings: ConfigurationSettings) => void |
|
|
|
|
|
|
|
|
|
getConfiguration: (value: string) => string |
|
|
|
|
setConfiguration: (name: string, value: string) => void |
|
|
|
|
getFileManagerMode: () => string |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getCompilationResult: () => any |
|
|
|
|
|
|
|
|
|
onCurrentFileChanged: (fileName: string) => void |
|
|
|
|
onResetResults: () => void |
|
|
|
|
onSetWorkspace: (isLocalhost: boolean) => void |
|
|
|
|
onNoFileSelected: () => void |
|
|
|
|
onCompilationFinished: (contractsDetails: any, contractMap: any) => void |
|
|
|
|
onSessionSwitched: () => void |
|
|
|
|
onContentChanged: () => void |
|
|
|
|
|
|
|
|
|
fileExists: (file: string) => Promise<boolean> |
|
|
|
|
writeFile: (file: string, content: string) => Promise<void> |
|
|
|
|
readFile: (file: string) => Promise<string> |
|
|
|
|
open: (file: string) => void |
|
|
|
|
>>>>>>> 49c62946c (better org of types) |
|
|
|
|
|
|
|
|
|
export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements ICompilerApi { |
|
|
|
|
constructor () { |
|
|
|
|
super() |
|
|
|
|