Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple contracts #8

Closed
eswarasai opened this issue Mar 3, 2019 · 6 comments
Closed

Add support for multiple contracts #8

eswarasai opened this issue Mar 3, 2019 · 6 comments

Comments

@eswarasai
Copy link
Contributor

Description

Figure out how solc-js and sabre handle different cases like below:

  • Multiple separate contracts in a single file
  • Base contract and inherited contract in the same file
  • Base contract in an imported file
@gitcoinbot
Copy link

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


This issue now has a funding of 1.2 ETH (161.85 USD @ $134.88/ETH) attached to it as part of the MythX fund.

@gitcoinbot
Copy link

gitcoinbot commented Mar 7, 2019

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


Work has been started.

These users each claimed they can complete the work by 12 months from now.
Please review their action plans below:

1) eswarasai has been approved to start work.

Will look into a way to support compilation of the above listed cases

Learn more on the Gitcoin Issue Details page.

@eswarasai
Copy link
Contributor Author

@b-mueller -- Here are my findings for the current setup of solc and sabre for different scenarios:

  1. Multiple separate contracts in a single file
    solc returns all the contracts as object with keys sorted in alphabetical order of the contract name. sabre picks up the first contract from the object and generates MythX report for that

  2. Base contract and inherited contract in the same file
    This works same as the above

  3. Base contract in an imported file
    This might be quite not possible yet as solc itself doesn't support importing files within contract -- Support imports in solcjs CLI ethereum/solc-js#114

Let me know how you'd like me to proceed further :)

@muellerberndt
Copy link
Owner

solc itself doesn't support importing files within contract

Ok, that sucks. Then there's also no easy way to fix #9.

I think in most cases it makes sense to return the analysis result for the contract with the longest byte code, which (if I'm not mistaken) should be the lowest in the inheritance hierarchy. Should we try that first?

@gitcoinbot
Copy link

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


Work for 1.2 ETH (164.15 USD @ $136.79/ETH) has been submitted by:

  1. @eswarasai

@b-mueller please take a look at the submitted work:


@gitcoinbot
Copy link

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


The funding of 1.2 ETH (164.15 USD @ $136.79/ETH) attached to this issue has been approved & issued to @eswarasai.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants