{"id":15290550,"url":"https://github.com/reserve-protocol/solstice","last_synced_at":"2025-05-07T05:02:34.755Z","repository":{"id":57615806,"uuid":"149830875","full_name":"reserve-protocol/solstice","owner":"reserve-protocol","description":"Shine light on your solidity code coverage","archived":false,"fork":false,"pushed_at":"2019-02-19T05:11:25.000Z","size":8437,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T06:32:09.880Z","etag":null,"topics":["coverage","ethereum","solidity"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reserve-protocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-22T00:07:44.000Z","updated_at":"2024-07-29T07:55:51.000Z","dependencies_parsed_at":"2022-08-27T07:30:14.543Z","dependency_job_id":null,"html_url":"https://github.com/reserve-protocol/solstice","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reserve-protocol%2Fsolstice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reserve-protocol%2Fsolstice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reserve-protocol%2Fsolstice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reserve-protocol%2Fsolstice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reserve-protocol","download_url":"https://codeload.github.com/reserve-protocol/solstice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816937,"owners_count":21808705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage","ethereum","solidity"],"created_at":"2024-09-30T16:08:35.793Z","updated_at":"2025-05-07T05:02:34.728Z","avatar_url":"https://github.com/reserve-protocol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Solstice](https://raw.githubusercontent.com/reserve-protocol/solstice/master/assets/solstice-full-logo.png)\n\nSolstice is a code coverage tool for the solidity language. The current dependencies are;\n* A running [parity client](https://www.parity.io/ethereum/)\n* A local version of [`solc`](https://solidity.readthedocs.io/en/latest/installing-solidity.html)\n* Access to the solidity contract code (and not just the addresses of said contracts on the blockchain).\n\nIt produces html files of the marked-up source code, where covered regions are marked green and uncovered regions are red.\n\n## Rudimentary setup instructions\n* Clone this repo\n* Have a working [go](https://golang.org/doc/install) development environment\n* Run `dep ensure` just inside the directory to install dependencies\n* Get a parity blockchain running\n* Fill out the `config.yml` file\n* Run `go build -o solstice`\n* Run `./solstice cover`\n\nIf all works as intended, your test command will run, you will see transactions happening on the parity client, and html files will be produced inside the `coverage_report_dir` you specified in the config file. If you open those html files in a browser, they should look like your source code files, marked red or green in a reasonable pattern reflecting your test coverage.\n\n![A coverage report](https://raw.githubusercontent.com/reserve-protocol/solstice/master/assets/coverage-report-screenshot.png)\n\n## The config file\nSolstice supports the following configuration options in a YAML file. For an example, see `config.yml`.\n* `contracts_dir`: A directory which contains all of your `.sol` contract files.\n* `coverage_report_dir`: The directory that you want the coverage report to end up in.\n* `blockchain_client`: The URL and port that your parity blockchain client is available on.\n* `test_command`: The command that runs your testing suite, which will send transactions to `blockchain_client`. Each space-separated part of the command should go on a separate line in the yaml, as a list.\n* `solc_args`: A YAML list of args to be given to the solc compiler while compiling your contracts. These args will be placed between the `solc` invocation and the `--combined-json` flag, in the order given. These args should match the ones that were originally used to compile the contracts that the `test_command` sends transactions to.\n\n## Other commands\n`solstice debug` will tell you the last line of code that a particular transaction ended on. This is especially useful for reverts, since the EVM does not currently provide any kind of error messages or stack traces.\n\n`solstice display` has two modes. One takes a transaction ID and delivers marked up source code for each step in the transaction, similar to a stack trace. The other takes a contract file and delivers marked up source code for each node in the abstract syntax tree (AST) of that file.\n\n`solstice cover_line` prints a more simplistic report of contract line numbers that were hit during the test run.\n\n## Running the tests\n\nSome unit tests are available by running `go test ./tests`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freserve-protocol%2Fsolstice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freserve-protocol%2Fsolstice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freserve-protocol%2Fsolstice/lists"}