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 solidity coverage #4

Open
ewingrj opened this issue Apr 23, 2018 · 3 comments
Open

add solidity coverage #4

ewingrj opened this issue Apr 23, 2018 · 3 comments

Comments

@ewingrj
Copy link
Contributor

ewingrj commented Apr 23, 2018

look into getting https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-cov/ to work.

It appears that we just need to produce a artifacts file which would be fairly trivial to generate from the solcpiler output.

artifacts content is found https://github.com/0xProject/0x-monorepo/blob/development/packages/sol-cov/src/collect_contract_data.ts#L13

@ewingrj
Copy link
Contributor Author

ewingrj commented Apr 25, 2018

okay, I took a shot at this w/ no luck.

I ran into a few errors when trying to write the coverage report.

  1. throwing error, failing to find a NEW_CONTRACT. Contract may not have been in the artifacts file. I commented out the place where error was thrown and the next error occurred.
  2. ParserError: looks like this occurred when trying to generate the AST in the sol-cover code. Maybe a better way about this would be to use the ast generated in standardJson, and visit that to collect the expressions.

I'm putting this on hold for the time being

@ewingrj
Copy link
Contributor Author

ewingrj commented May 23, 2018

okay, this is implemented in the sol-cov branch. I'm just waiting on the PR to be merged and a new release to happen.

Then I can update the sol-cov branch to the latest format & merge to master

@ewingrj
Copy link
Contributor Author

ewingrj commented Jun 14, 2018

updates...

there were quite a few changes to the sol-cov project. I've updated solcpiler & the sol-cov branch to reflect the latest changes. Were waiting on this PR and PR to be merged and a release to happen.

In the meantime, to run the sol-cov branch do the following:

  1. clone https://github.com/perissology/0x-monorepo/ locally
  2. cd 0x-monorepo
  3. git co feature/create
  4. follow direction in README.md to install & build
  5. yarn link
  6. cd ../path/to/giveth-bridge
  7. yarn link "@0xproject/sol-cov"

You should now be able to run yarn cover:sol

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