Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sergey Tselovalnikov
    @SerCeMan
    Hey, @githubityu! This is not an issue with the plugin, try to reimport the project from sources.
    Hey, @liuzhecodekiller! Try to watch the abovementioned video, it explains how to work on a project step by step
    cedric walter
    @cedricwalter
    hi , @githubityu! do you plan to build 2.0.6 soon?, i get hit with multiple Intellij hang, maybe providing a beta. Of course i can build from sources...
    cedric walter
    @cedricwalter
    updated to 2.0.6-SNAPSHOT but it still block IDE, now searching for another causes....
    odanijel
    @odanijel
    Is there any tutorial how to start. Do I start it as ordinary PHP code and than start adding .sol files ?
    So as sad I created PHP project, created some .sol files, but don't know hot to compile it.
    Mikhail Bolotov
    @mbolotov
    Hey, @odanijel!
    2.1.0 plugin does not actually support compiling and executing solidity files in IDEs which do not support project building (like PHP Sthorm, PyCharm and some others). There will be a separate menu action to compile solidity in the next plugin version.
    Currently you may use the truffle framework to compile and run your solidity code
    Daonomic
    @0v1se

    @mbolotov when I run contract functions, what state of blockchain do I get?
    Is the state saved between different runs?

    Also, for me it's not returning correct results. For example, I have a function:

    function getter() returns (bool) {
    return true;
    }

    and the plugin tells me:

    Submitting contracts... Done.
    Function 'NewTest.getter' returned:
    false

    odanijel
    @odanijel
    @mbolotov Ok thank you for your reply :)
    Mikhail Bolotov
    @mbolotov
    @0v1se, I tried your sample and it printed 'true' for me.
    You may try call 'rebuild' action for the project. And then ensure that the solidity has been compiled. The default output path is '$projectDir/out/production/$moduleName'
    As for the state of blockchain, I can't say for sure about this just because I didn't dig deeper into the whole domain. I believe the state is persisted (as long as your keep the ethereum db path setting) but the plugin performs contract submitting on each run. So as I understand the contract gets a clean state when being run by plugin.
    Daonomic
    @0v1se

    @SerCeMan hey
    What do you think about adding some inspections?
    For example, plugin can check and highlight function that do not return values (It's not a bug in solidity, but it's very suspicious)
    code like this:
    function transfer(uint amount) returns (bool) {
    //some actions
    super.transfer(amount);
    //no return
    }

    this code compiles fine, but it apparently has a bug. Inspection can catch this and highlight this function

    Sergey Tselovalnikov
    @SerCeMan
    Hey, @0v1se! More inspections sounds great! We currently have a few I believe, but they don't do much.
    Daonomic
    @0v1se
    ok. this one bothers me so I mentioned it. Suggest some if you have any ideas.
    Sergey Tselovalnikov
    @SerCeMan
    @0v1se It would be nice to be able to catch some of the "pitfalls" from http://solidity.readthedocs.io/en/v0.4.24/security-considerations.html, but I haven't looked into it
    Maciej KamiƄski
    @maciejka
    Hi, nice pluging! How to make it work with dapp.tools? It does not seem to get dapp.tools submodules out of the box...
    Sergey Tselovalnikov
    @SerCeMan
    Hey, @maciejka! I've never tried to do anything with dapp.tools, there is no special support for it.
    Asi81
    @Asi81
    Hi Sergey. Is it possible to set allow-paths to solc compiler when compilling the project. Im using open-zeppelin and 'truffle compile' has no problem wit it. I installed it with 'npm install open-zeppelin' and this library resides in node_modules. But when compiling with intellij-solidity tool -> 'Other->compile Solidity', compiler from EthereumJ bundle cant find tha package.
    Mikhail Bolotov
    @mbolotov
    Hey, @Asi81 !
    No, that is not possible now.
    We'll probably try to add a feature to pass additional parameters to solc.
    Waqas Wahid
    @waqas_wahid001_twitter
    Hi
    Sergey Tselovalnikov
    @SerCeMan
    Hi, @waqas_wahid001_twitter
    Mikhail Bolotov
    @mbolotov
    Hey, @Asi81!
    Please note that solidity plugin v. 2.1.2 now supports additional solc compiler options (check out solidity settings)
    Daonomic
    @0v1se
    @mbolotov it would be great if solc compiler could compile sources from paths supported by truffle (node_modules etc.)
    Is it difficult to add?
    Mikhail Bolotov
    @mbolotov
    @0v1se, as I wrote in intellij-solidity/intellij-solidity#109
    plugin can support any paths via the additional parameters and the path redirects feature of solc
    Do you think we should support some specific paths directly?
    Daonomic
    @0v1se
    I think, yes, these paths should be supported out of the box.
    @SerCeMan what do you think?
    Sergey Tselovalnikov
    @SerCeMan

    @mbolotov @0v1se I think it would be reasonable to delegate to truffle instead of trying to resemble the behaviour. The behaviours will always be different. It's virtually impossible to copy all the nuances of the tool multiple people might rely upon. Whereas if for node-based projects truffle is integrated directly then even when the API changes the integration will continue working.

    So, I can see a couple of options here:

    • Decide to support truffle in the current compilation mode, this will require spending a significant amount of time on something that truffle already does
    • Clearly state that the current mode is different to truffle, and either not support truffle at all or have a different integration that delegates to truffle directly.
    Daonomic
    @0v1se

    @mbolotov @SerCeMan I would prefer deeper integration with truffle and delegating compilation to truffle directly.
    That's how I use plugin/truffle now: I use Intellij + plugin as editor (+navigation etc) and use truffle for compilation/tests.

    It would be great to have deeper integration with truffle (to build and run tests, especially for running individual tests). But I get it's a lot of work to do.

    Guys, how do you use solc compilation currently? (I mean, from the plugin) What are your use cases?

    @SerCeMan what do you think about most needed features of the plugin?
    From my point of view, plugin needs better reference resolution (sometimes it doesn't get references to functions and other identifiers correctly), also it needs better suggestions. When language support is more complete, then will be easier to add more inspections.

    So, these features I need the most: better language support (references resolutions, suggestions, navigation) and inspections to catch some well-known vulnerabilities

    What do you think about this?

    Mikhail Bolotov
    @mbolotov

    Guys, how do you use solc compilation currently? (I mean, from the plugin) What are your use cases?

    Well, I actually have no regular solidity development activity. All my contributions to the plugin is mostly driven by interest in IDEA plugin development and Kotlin learning. And a bit by interest in the cryptocurrency domain.
    So I have nothing to answer to your question now.

    Stephen Ford
    @Ariestattoo
    This is issue is kinda wrecking my code when ever I auto format. What kind of learning curve am I looking at to resolve this in terms of a pull request and toolset needed?
    Daonomic
    @0v1se

    @Ariestattoo I already implemented this. Will publish PR soon
    But it's not related to autoformat. It will only affect navigation.

    What do you mean by "wrecking my code". Pls, give me an example

    Denys Dushyn
    @indegro

    Hello guys.
    My name is Denys and last year I work with ethereum and use intellij-solidity plugin to write smart contracts.
    Recently I provided 2 pull request(event/function names completion) .

    It was 2 pr in order to know more about plugin structure and what functionality is inside.
    I have a couple of questions.

    One about solidity.bnf.
    There two different function call rules.Are there any need for this rules(I mean FunctionCallExpression and CallExpression). Whom can I consult about that functionality?
    I need it to make function completion more robust(Move some functionality from function contributor to SolReference.getVariants()).

    The second one is what are the plans for the future?
    Do you do some kind of planning, milestones?

    As from my side I have some experience with truffle framework and in free time would like to spent time to add/start/research on truffle integration (Use it on a current project intensively)

    Thanks in advance

    Sergey Tselovalnikov
    @SerCeMan

    @0v1se!

    Guys, how do you use solc compilation currently? (I mean, from the plugin) What are your use cases?

    Currently, I don't use the solc support from the plugin. But at the same time, I see value in it as a "playground" which might be especially useful for newcomers to Solidity who just want to play with the basics of the language.

    what do you think about most needed features of the plugin?

    I totally agree with you about the resolve, it's required for the rest of the features to work correctly. Most of the inspections rely on resolve, and for the inspections, it's crucial to have a low false-positive rate or otherwise, users will disable them altogether. Disabling inspections for a single statement or expression might not be an option for the teams where developers use multiple code editors.

    Autocompletion needs to be given more love as well. There're too many cases currently where the plugin fails to complete basic types, for example when the expression is not terminated with a semicolon.

    Sergey Tselovalnikov
    @SerCeMan

    Hey, @Ariestattoo!

    What kind of learning curve am I looking at to resolve this in terms of a pull request and toolset needed?

    If you've done any Kotlin or IntelliJ plugin development it will definitely be helpful, but if you haven't it shouldn't be a problem - formatting rules are mostly declarative. I've put together some very basic documentation, https://github.com/intellij-solidity/intellij-solidity/blob/master/DEVELOPING.adoc. I hope the amount of content will increase in the future. As a dev workflow, you can create a formatting test that reproduces the problem, and try to debug it to see where the issue is.

    If you have any questions, feel free to ask!

    Sergey Tselovalnikov
    @SerCeMan

    Hey, @indegro!

    Thank you for the contribution!

    There two different function call rules.Are there any need for this rules

    The CallExpression was added to support chained calls like https://github.com/intellij-solidity/intellij-solidity/blob/master/src/test/resources/fixtures/parser/callChain.sol#L3, but probably it's possible to express this via FunctionCallExpression, and get rid of CallExpression but it might not be trivial.

    The second one is what are the plans for the future?
    Do you do some kind of planning, milestones?

    There is no explicit planning or milestones apart from the releasing. Typically, the plugin is released once a month. There also some "inevitable" milestones caused by the new feature releases of the solidity language.

    Denys Dushyn
    @indegro
    @SerCeMan Thank you for response. Will look into the code. I will compare grammar inside plug-in and in solidity codebase. It would be great to unify such calls
    Ruben Dario Ramirez Ochoa
    @rbndigital
    hello
    Denys Dushyn
    @indegro
    Hello
    Denys Dushyn
    @indegro
    Hello @SerCeMan , after reviewing grammar in solidity.bnf I have found that fixedNumber regexp contains in its definition underscore symbol. What was a reason to add such symbol to regexp? Example from solidity -- regexp:([_0-9]+.[_0-9]|[_0-9].[_0-9]+)
    Thanks in advance
    Is it a new feature that will be available in solidity?
    Denys Dushyn
    @indegro
    @SerCeMan Resolved. Found description about underscores in upcoming 0.5.0 version.
    Denys Dushyn
    @indegro
    Hello @SerCeMan I've almost finished parser redesign, tried to get rid of CallExpression and tried to improved completion that involve member access.
    Could you please review my branch https://github.com/indegro/intellij-solidity/commits/parser when you have time.
    I would like to get recommendation what should I improve for final version.
    Thanks in advance
    Sergey Tselovalnikov
    @SerCeMan
    @indegro Thanks! I skimmed through, and generally, it looks good to me, but if you could split the code into smaller chunks when you send the PRs it will be greatly appreciated. It will help to speed up the review a lot :)
    Denys Dushyn
    @indegro
    @SerCeMan Okey :). Ya, commit is large. I'll split up into several PRs
    Jitendra Chittoda
    @jchittoda
    I am getting error Solidity compilation failed: contracts/interfaces/IERC1594.sol:3:1: Error: Source "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol" not found: File not found. import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
    Even if I have folder present in node_modules
    Mikhail Bolotov
    @mbolotov

    Hi @jchittoda!
    Yes, the issue your has filled is still not resolved, see intellij-solidity/intellij-solidity#109
    There is a workaround mentioned here:

    There is the 'solc additional parameters' field in the Solidity settings.
    So you can use the solc path redirects feature using "prefix=path" pattern.

    Do you tried this one?

    Sergey Tselovalnikov
    @SerCeMan

    Hey, @mbolotov! I've been thinking about the best way to resolve the compatibility problems with the non-Java IDEs. WDYT of separating the logic into two separate plugins? That way, the IntelliJ Solidity will be available for download under all IDE, and IntelliJ Solidity Compiler (Or IntelliJ Solc) can become a plugin that can only be installed on IU and IC.

    I haven't investigated much, but I think it should be possible to add a few extension points (Plugin Extensions and Extension Points / IntelliJ Platform SDK DevGuide) to integrate Solc plugin into IntelliJ solidity.

    The only downside that I can think of is that we'll have to be a bit more careful with the backwards compatibility for the integration points which shouldn't be a big problem. What do you think?

    Mikhail Bolotov
    @mbolotov
    Hey, @SerCeMan!
    Yes, I thought about such a separation when found that some IDEs do not support Java Run. But I then considered it would require too much efforts to support two plugin versions. If you think it worth to have them separated then I'll try to dig into this way.
    But I actually thought about separating only the running feature, not the compiling one since all of the IDEs can run solc to compile solidity code. Why do you think the compilation should be extracted as well?
    Sergey Tselovalnikov
    @SerCeMan

    all of the IDEs can run solc to compile solidity code

    That's a good point. This can make the separation harder though as there is no clear convenient cut in that case I think, I'll try to take a further look.