Commit 639e1a15 authored by lianahus's avatar lianahus

added 'compile with optimism

parent 969a21db
...@@ -71,7 +71,7 @@ const css = csjs` ...@@ -71,7 +71,7 @@ const css = csjs`
const profile = { const profile = {
name: 'pluginManager', name: 'pluginManager',
displayName: 'Plugin manager', displayName: 'Plugin manager',
methods: ['registerFlattener'], methods: ['registerFlattener', 'registerOptimismCompiler'],
events: [], events: [],
icon: 'assets/img/pluginManager.webp', icon: 'assets/img/pluginManager.webp',
description: 'Start/stop services, modules and plugins', description: 'Start/stop services, modules and plugins',
...@@ -116,8 +116,8 @@ class PluginManagerComponent extends ViewPlugin { ...@@ -116,8 +116,8 @@ class PluginManagerComponent extends ViewPlugin {
if (!res) { if (!res) {
reporCompileIssue() reporCompileIssue()
} else { } else {
await this.call('menuicons', 'select', 'flattener1') await this.call('menuicons', 'select', 'flattener')
const path = await this.call('flattener1', 'flattenAndSave', res) const path = await this.call('flattener', 'flattenAndSave', res)
await this.call('fileManager', 'open', path) await this.call('fileManager', 'open', path)
} }
} else { } else {
...@@ -126,6 +126,12 @@ class PluginManagerComponent extends ViewPlugin { ...@@ -126,6 +126,12 @@ class PluginManagerComponent extends ViewPlugin {
}, 1000) }, 1000)
} }
async registerOptimismCompiler (event) {
await this.call('optimism-compiler', 'compile', event.path[0])
await this.call('menuicons', 'select', 'optimism-compiler')
await this.call('fileManager', 'open', event.path[0])
}
async onActivation () { async onActivation () {
await this.call('filePanel', 'registerContextMenuItem', { await this.call('filePanel', 'registerContextMenuItem', {
id: 'pluginManager', id: 'pluginManager',
...@@ -136,6 +142,15 @@ class PluginManagerComponent extends ViewPlugin { ...@@ -136,6 +142,15 @@ class PluginManagerComponent extends ViewPlugin {
path: [], path: [],
pattern: [] pattern: []
}) })
await this.call('filePanel', 'registerContextMenuItem', {
id: 'pluginManager',
name: 'registerOptimismCompiler',
label: 'Compile with Optimism',
type: [],
extension: ['.sol'],
path: [],
pattern: []
})
} }
activateP (name) { activateP (name) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment