ethberlin-hackathon / ETHBerlin-Bounties

Check out the bounties our collaborators have put out for you! For their tools, head to the Knowledge Base
4 stars 10 forks source link

[Remix] Solium Plugin #19

Closed yann300 closed 5 years ago

yann300 commented 6 years ago

Solium Plugin

(subject to change)

We've been releasing an API (available in http://remix-alpha.ethereum.org) which allows developing plugin for Remix. (See https://github.com/ethereum/remix/blob/master/docs/remix_plugin.md and https://github.com/ethereum/remix/blob/master/docs/remix_plugin_api.md) Checkout https://remix-alpha.ethereum.org / settings tab / Oraclize for a live example.

This issue is specifically about developing a Solium Plugin.

Proposal for implementation

(You don't need to strictly follow this proposal, we would like to have your feedback)

https://github.com/duaraghav8/Solium

Functions of the Plugin

Links

Team

We are the team behind Remix IDE and related libraries, using this hackathon as a kickstart for the Remix API. We've setup an extended team for helping you during this event

Beside normal funding, we will at the end of the event select 4 teams that will receive sponsorship from the Ethereum Foundation.

Be sure to contact us at any time online or grab us directly at the event.

Skills wanted

JavaScript / Ethereum

Communication

We will be around giving advice and helping if needed. And in any case just drop your thoughts there ;)

https://gitter.im/ethereum/remix-dev-plugin

How to get started:

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 500.0 DAI (500.0 USD @ $1.0/DAI) attached to it.

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 3 years, 5 months ago. Please review their action plans below:

1) subramanianv has started work.

Action plan Look at how solium can be configured through command line Look at how to use the remix plugin api Integrate solium using an iframe

Learn more on the Gitcoin Issue Details page.

yann300 commented 6 years ago

@subramanianv please contact @duaraghav8, he can provide a browserified version of solium or tell you how to build one.

subramanianv commented 6 years ago

@yann300 I reached out to solium. They dont have a browserified version of solium yet. So in the meanwhile I'll go through the code and work on other parts for this issue till solium is ready

subramanianv commented 6 years ago

@yann300 I am trying to install remix-plugin through npm. Its says not found npm install --save remix-plugin is the command I ran

yann300 commented 6 years ago

it is not published. You need to clone https://github.com/yann300/remix-plugin

subramanianv commented 6 years ago

I am waiting on the browserified version of solium. Will continue once thats ready.

yann300 commented 6 years ago

@subramanianv this PR provides browser support for solium: https://github.com/duaraghav8/Solium/pull/241

subramanianv commented 6 years ago

@yann300 Thanks. I am starting work on this

yann300 commented 6 years ago

that has been merged here https://github.com/duaraghav8/Solium/tree/browserify , npm run browserify for generating the bundle.js

subramanianv commented 6 years ago

@yann300 I get this error when running npm run browserify Is there a package missing ? ReferenceError: Unknown plugin "fast-async" specified in "base" at 0, attempted to resolve relative to "/Users/subramanianvenkatesan/Solium/lib" while parsing file: /Users/subramanianvenkatesan/Solium/lib/lib.js at /Users/subramanianvenkatesan/Solium/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17 at Array.map (<anonymous>) at Function.normalisePlugins (/Users/subramanianvenkatesan/Solium/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20) at OptionManager.mergeOptions (/Users/subramanianvenkatesan/Solium/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36) at OptionManager.init (/Users/subramanianvenkatesan/Solium/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12) at File.initOptions (/Users/subramanianvenkatesan/Solium/node_modules/babel-core/lib/transformation/file/index.js:212:65) at new File (/Users/subramanianvenkatesan/Solium/node_modules/babel-co

yann300 commented 6 years ago

will push a PR. please try addin "fast-async": "6.3.1", to the devDependencies

yann300 commented 6 years ago

@subramanianv let me know if that is working

subramanianv commented 6 years ago

@yann300 Works now. Thanks :)

On Tue, Oct 2, 2018 at 9:51 PM yann300 notifications@github.com wrote:

@subramanianv https://github.com/subramanianv let me know if that is working

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ethberlin-hackathon/ETHBerlin-Bounties/issues/19#issuecomment-426337779, or mute the thread https://github.com/notifications/unsubscribe-auth/ACqZ8WGP7RAVkMHQIOwaTfUV7-12fZmWks5ug5KmgaJpZM4WbFzr .

-- Thanks, Subramanian Venkatesan.

subramanianv commented 6 years ago

@yann300 I am trying to import the build file var Solium = require('./build/solium-browser-bundle.js')

I get the following error Cannot find module './decode' from '/Users/subramanianvenkatesan/Solium/build' at /Users/subramanianvenkatesan/.nvm/versions/node/v8.11.3/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21 at load (/Users/subramanianvenkatesan/.nvm/versions/node/v8.11.3/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43) at onex (/Users/subramanianvenkatesan/.nvm/versions/node/v8.11.3/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31) at /Users/subramanianvenkatesan/.nvm/versions/node/v8.11.3/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47 at FSReqWrap.oncomplete (fs.js:152:21)

Is there a file missing ? What version of browserify do you ?

yann300 commented 6 years ago

solium-browser-bundle.js can't be loaded using require I think. (but can direclty be used in a script tag <script></script>

yann300 commented 6 years ago

if you want to import in your project like this, we might just do require('<soliumpath>/lib/lib.js')

subramanianv commented 6 years ago

Ah ok. I got it. Now importing the build on the html page through a script tag.

yann300 commented 6 years ago

then you can access it with window.solium see https://github.com/duaraghav8/Solium/blob/browserify/lib/lib.js for the interface

subramanianv commented 5 years ago

@yann300 I am trying to use the remix's hightlight api.

window.parent.postMessage(JSON.stringify({ action: 'request', key: 'editor', type: 'hightlight', value: [{line:1,column:1}, filename, '#FF9F33'], id: _9 }),'*')

I get back Unexpected token o in JSON at position 1 The JSON seems to be well formed though. Can you paste an example of how to use the hightlight api ?

yann300 commented 5 years ago

try something like {"start": { "line": 5, "column": 5 }, "end": { "line": 6, "column": 5 }}

yann300 commented 5 years ago

perhaps would be more convenient to use the remix-api.js lib from https://github.com/yann300/remix-plugin/tree/master/src instead of using postMessage directly

subramanianv commented 5 years ago

@yann300 I made a basic version of the plugin. http://industrious-bomb.surge.sh/ Use it on a non-https version of remix. Let me know what you think.

yann300 commented 5 years ago

that looks nice ;) would it be possible to : 1) add a lintAndFix button 2) put the configuration file in the config explorer (for that you can easily use setConfig, getConfig. Basically the plugin automatically add the file if not present.

subramanianv commented 5 years ago

Is Solium.lintAndFix function exposed in the browser version of Solium ? I get Solium.lintAndFix is not a function

yann300 commented 5 years ago

see in https://github.com/duaraghav8/Solium/blob/browserify/lib/lib.js you can specify autoFix in the config or directly as a param

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 500.0 DAI (500.0 USD @ $1.0/DAI) has been submitted by:

  1. @subramanianv

@ceresstation please take a look at the submitted work:


gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 500.0 DAI (500.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @subramanianv.