|
|
@ -5,7 +5,7 @@ import { CompilerAbstract } from '@remix-project/remix-solidity' |
|
|
|
|
|
|
|
|
|
|
|
const profile = { |
|
|
|
const profile = { |
|
|
|
name: 'compilerArtefacts', |
|
|
|
name: 'compilerArtefacts', |
|
|
|
methods: ['get', 'addResolvedContract', 'getCompilerAbstract', 'getAllContractDatas', 'getLastCompilationResult', 'getArtefactsByContractName', 'getContractDataFromAddress', 'getContractDataFromByteCode'], |
|
|
|
methods: ['get', 'addResolvedContract', 'getCompilerAbstract', 'getAllContractDatas', 'getLastCompilationResult', 'getArtefactsByContractName', 'getContractDataFromAddress', 'getContractDataFromByteCode', 'saveCompilerAbstract'], |
|
|
|
events: [], |
|
|
|
events: [], |
|
|
|
version: '0.0.1' |
|
|
|
version: '0.0.1' |
|
|
|
} |
|
|
|
} |
|
|
@ -24,6 +24,10 @@ export class CompilerArtefacts extends Plugin { |
|
|
|
this.compilersArtefactsPerFile = {} |
|
|
|
this.compilersArtefactsPerFile = {} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
saveCompilerAbstract (file: string, compilerAbstract: CompilerAbstract) { |
|
|
|
|
|
|
|
this.compilersArtefactsPerFile[file] = compilerAbstract |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onActivation () { |
|
|
|
onActivation () { |
|
|
|
const saveCompilationPerFileResult = (file, source, languageVersion, data, input?) => { |
|
|
|
const saveCompilationPerFileResult = (file, source, languageVersion, data, input?) => { |
|
|
|
this.compilersArtefactsPerFile[file] = new CompilerAbstract(languageVersion, data, source, input) |
|
|
|
this.compilersArtefactsPerFile[file] = new CompilerAbstract(languageVersion, data, source, input) |
|
|
|