add context menu option to compile vyper contracts

pull/5370/head
Joseph Izang 10 months ago
parent 53bd585a17
commit c7ee12435e
  1. 13
      apps/remix-ide/src/remixAppManager.js
  2. 6
      apps/vyper/src/app/utils/remix-client.tsx
  3. 2
      apps/vyper/src/profile.json

@ -153,7 +153,7 @@ export class RemixAppManager extends PluginManager {
if (Registry.getInstance().get('platform').api.isDesktop()) {
requiredModules = [...requiredModules, 'fs', 'electronTemplates', 'isogit', 'remix-templates', 'electronconfig', 'xterm', 'compilerloader', 'ripgrep']
}
}
async canActivatePlugin(from, to) {
@ -331,6 +331,17 @@ export class RemixAppManager extends PluginManager {
sticky: true,
group: 7
})
await this.call('filePanel', 'registerContextMenuItem', {
id: 'vyper',
name: 'vyperCompileCustomAction',
label: 'Compile vyper',
type: [],
extension: ['.vy'],
path: [],
pattern: [],
sticky: true,
group: 7
})
if (Registry.getInstance().get('platform').api.isDesktop()) {
await this.call('filePanel', 'registerContextMenuItem', {
id: 'fs',

@ -1,4 +1,4 @@
import {HighlightPosition, CompilationResult, RemixApi} from '@remixproject/plugin-api'
import {HighlightPosition, CompilationResult, RemixApi, customAction} from '@remixproject/plugin-api'
import {Api, Status} from '@remixproject/plugin-utils'
import {createClient} from '@remixproject/plugin-webview'
import {PluginClient} from '@remixproject/plugin'
@ -26,6 +26,10 @@ export class RemixClient extends PluginClient {
})
}
async vyperCompileCustomAction(action: customAction) {
console.log('vyperCompileCustomAction', action)
}
/** Load Ballot contract example into the file manager */
async loadContract({name, address}: ExampleContract) {
try {

@ -1,7 +1,7 @@
{
"name": "vyper",
"displayName": "Vyper Plugin",
"methods": ["getCompilationResult", "compile"],
"methods": ["getCompilationResult", "compile", "vyperCompileCustomAction"],
"url": "https://ipfs-cluster.ethdevops.io/ipfs/QmbmPzUg7ghTKcF2eo64zm1k1LKdibYfqYmiqXkHKXks8r",
"documentation": "https://remix-ide.readthedocs.io/en/latest/plugin_list.html",
"description": "Compile vyper contracts",

Loading…
Cancel
Save