From 2c2fdb4139e2a5a15c85ddc9eff41d8d1876c3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?= Date: Mon, 17 Jun 2024 15:48:12 +0200 Subject: [PATCH] Add compilationSaved event --- libs/remix-core-plugin/src/lib/compiler-artefacts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index 428bc7bf75..ded062af88 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -6,7 +6,7 @@ import {CompilerAbstract} from '@remix-project/remix-solidity' const profile = { name: 'compilerArtefacts', methods: ['get', 'addResolvedContract', 'getCompilerAbstract', 'getAllContractDatas', 'getLastCompilationResult', 'getArtefactsByContractName', 'getContractDataFromAddress', 'getContractDataFromByteCode', 'saveCompilerAbstract', 'getAllCompilerAbstracts'], - events: [], + events: ['compilationSaved'], version: '0.0.1', } @@ -36,6 +36,7 @@ export class CompilerArtefacts extends Plugin { const saveCompilationResult = (file, source, languageVersion, data, input?) => { this.compilersArtefactsPerFile[file] = new CompilerAbstract(languageVersion, data, source, input) this.compilersArtefacts.__last = this.compilersArtefactsPerFile[file] + this.emit('compilationSaved', {[file]: this.compilersArtefactsPerFile[file]}) } this.on('solidity', 'compilationFinished', saveCompilationResult)