Commit 639e1a15 authored by lianahus's avatar lianahus

added 'compile with optimism

parent 969a21db
......@@ -71,7 +71,7 @@ const css = csjs`
const profile = {
name: 'pluginManager',
displayName: 'Plugin manager',
methods: ['registerFlattener'],
methods: ['registerFlattener', 'registerOptimismCompiler'],
events: [],
icon: 'assets/img/pluginManager.webp',
description: 'Start/stop services, modules and plugins',
......@@ -116,8 +116,8 @@ class PluginManagerComponent extends ViewPlugin {
if (!res) {
reporCompileIssue()
} else {
await this.call('menuicons', 'select', 'flattener1')
const path = await this.call('flattener1', 'flattenAndSave', res)
await this.call('menuicons', 'select', 'flattener')
const path = await this.call('flattener', 'flattenAndSave', res)
await this.call('fileManager', 'open', path)
}
} else {
......@@ -126,6 +126,12 @@ class PluginManagerComponent extends ViewPlugin {
}, 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 () {
await this.call('filePanel', 'registerContextMenuItem', {
id: 'pluginManager',
......@@ -136,6 +142,15 @@ class PluginManagerComponent extends ViewPlugin {
path: [],
pattern: []
})
await this.call('filePanel', 'registerContextMenuItem', {
id: 'pluginManager',
name: 'registerOptimismCompiler',
label: 'Compile with Optimism',
type: [],
extension: ['.sol'],
path: [],
pattern: []
})
}
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