You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to be able to add a set of console commands as part of our custom plugin (https://github.com/NethermindEth/zksync-remix-plugin) feature set. Ideally, we would like to be able to add a command 'module', (eg. zksync.js, ), so that in Remix console a user can type a command, eg. zksync.compile("myFile.sol"), to trigger a "Compile" feature of the custom plugin.
Is this possible via existing Remix SDK?
The text was updated successfully, but these errors were encountered:
Actually thinking about this further, two command syntax approaches are possible:
Follow the JS syntax, ie. expect the following syntax: <module-name>.<command>(<parameter-list>)
Follow the "CLI convention", ie expect: <module-name> <command> <parameter1> <parameter2>...
Regarding the sourcing of the module JS file, I can imagine the following:
a) Publish the <module-name>.js as npm package and specify the package reference in the plugin descriptor
b) Publish the <module-name>.js together with plugin UI, and specify URL in the plugin descriptor
c) Put the <module-name>.js in remix workspace, following some convention (eg. /commands/module-name.js) and allow calling commands from there.
Option c) is imho the least favourable for our case, as we would like the commands to be bundled with the plugin, in a way which is transparent to the user...
thanks for the details!
The module wouldn't be editable by the end user right?
solution a) could already work in some ways. If you already have such a NPM package, I would be happy to give it a try.
We would like to be able to add a set of console commands as part of our custom plugin (https://github.com/NethermindEth/zksync-remix-plugin) feature set. Ideally, we would like to be able to add a command 'module', (eg.
zksync.js
, ), so that in Remix console a user can type a command, eg.zksync.compile("myFile.sol")
, to trigger a "Compile" feature of the custom plugin.Is this possible via existing Remix SDK?
The text was updated successfully, but these errors were encountered: