From c82921ba9cb7f662dace7df91956cd8cccb59803 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 29 Oct 2018 17:11:09 +0100 Subject: [PATCH] add compiler to terminal --- src/app/panels/editor-panel.js | 8 ++++++-- src/app/panels/terminal.js | 1 + src/app/tabs/run-tab.js | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/panels/editor-panel.js b/src/app/panels/editor-panel.js index 70e8bbfae0..afe06259f7 100644 --- a/src/app/panels/editor-panel.js +++ b/src/app/panels/editor-panel.js @@ -26,7 +26,8 @@ class EditorPanel { config: self._components.registry.get('config').api, txListener: self._components.registry.get('txlistener').api, fileManager: self._components.registry.get('filemanager').api, - udapp: self._components.registry.get('udapp').api + udapp: self._components.registry.get('udapp').api, + compiler: self._components.registry.get('compiler').api } self.data = { _FILE_SCROLL_DELTA: 200, @@ -46,7 +47,10 @@ class EditorPanel { contextualListener: contextualListener, contextView: new ContextView({contextualListener: contextualListener, editor: editor}), terminal: new Terminal({ - udapp: self._deps.udapp + udapp: self._deps.udapp, + compilers: { + 'solidity': self._deps.compiler + } }, { getPosition: (event) => { diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index c6612ea038..7aed50bab0 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -613,6 +613,7 @@ class Terminal { function domTerminalFeatures (self, scopedCommands) { return { + compilers: self._opts.compilers, swarmgw, ethers, remix: self._components.cmdInterpreter, diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index 7de8dbd09b..313053a398 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -404,6 +404,7 @@ function contractDropdown (events, self) { if (data) { data.contractName = selectedContract.name data.linkReferences = selectedContract.contract.object.evm.bytecode.linkReferences + data.contractABI = selectedContract.contract.object.abi } self._deps.udapp.createContract(data, (error, txResult) => { if (!error) {