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

chore: improve efficiency of solc and slither checks #63

Open
mds1 opened this issue Apr 15, 2022 · 0 comments
Open

chore: improve efficiency of solc and slither checks #63

mds1 opened this issue Apr 15, 2022 · 0 comments

Comments

@mds1
Copy link
Contributor

mds1 commented Apr 15, 2022

The solc and slither checks are pretty similar:

  • Both compile contracts from Etherscan
  • They share a lot of the same logic

Right now, this means we compile contracts twice and have some code duplicated. I'd like to cut down on this, but want to think about the best way to do it. One approach is to have the solc check export a zip file, and have slither consume that zip file instead of re-compiling contracts.

However, we didn't do that in #62 are because it couples the two checks, and makes the ordering matter. Additionally we currently use a Promise.all to execute proposal checks, which wouldn't work if the ordering of those two checks matters.

The scope of this issue is determining the best way to keep the two checks as separate items on the report without wasting time compiling contracts twice. One approach might be combine these into a single check TS file, and simply refactor how reports are generated as part of #33, and remove the 1:1 mapping between proposal check file and report section

@mds1 mds1 mentioned this issue Apr 15, 2022
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

1 participant