{"id":20817467,"url":"https://github.com/chaintope/contract-coverager","last_synced_at":"2025-05-11T21:30:40.587Z","repository":{"id":34894888,"uuid":"184971799","full_name":"chaintope/contract-coverager","owner":"chaintope","description":"Coverage tool for SmartContract","archived":true,"fork":false,"pushed_at":"2023-01-07T05:14:09.000Z","size":987,"stargazers_count":4,"open_issues_count":15,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T07:53:17.367Z","etag":null,"topics":["abi","coverage","ethereum","smart-contract","solidity","vyper"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaintope.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":"2019-05-05T03:04:48.000Z","updated_at":"2025-02-10T09:43:14.000Z","dependencies_parsed_at":"2023-01-15T10:01:17.992Z","dependency_job_id":null,"html_url":"https://github.com/chaintope/contract-coverager","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaintope%2Fcontract-coverager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaintope%2Fcontract-coverager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaintope%2Fcontract-coverager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaintope%2Fcontract-coverager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaintope","download_url":"https://codeload.github.com/chaintope/contract-coverager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253638746,"owners_count":21940416,"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":["abi","coverage","ethereum","smart-contract","solidity","vyper"],"created_at":"2024-11-17T21:42:13.645Z","updated_at":"2025-05-11T21:30:37.781Z","avatar_url":"https://github.com/chaintope.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Name\n====\n\nOverview\n\n## Description\nCoverage Tool for SmartContract.\nAnalayzing based on bytecodes and abi specification for functions.\n\n## Requirement\nTruffle v5.0.14 or higher.\n\n```\n## Install\n`npm install contract-coverage`\n\n## Usage\nAdd following code in your truffle test cases:\n```js\nconst CoverageSubprovider = require('contract-coverager')\nconst engine = CoverageSubprovider.injectInTruffle(artifacts, web3)\n```\n\nand define before, after hook code:\n```js\nbefore(() =\u003e engine.start())\nafter(() =\u003e engine.stop())\n```\n\nexample code overall:\n```js\nconst CoverageSubprovider = require('contract-coverager')\nconst engine = CoverageSubprovider.injectInTruffle(artifacts, web3)\nconst VyperStorage = artifacts.require(\"VyperStorage\")\n\ncontract(\"VyperStorage\", (accounts) =\u003e {\n  before(() =\u003e engine.start())\n  after(() =\u003e engine.stop())\n\n  it(\"...should store the value 89.\", async () =\u003e {\n    const storage = await VyperStorage.new()\n\n    // Set value of 89\n    const receipt = await storage.set(89)\n    // Get stored value\n    const storedData = await storage.get()\n    assert.equal(storedData, 89, \"The value 89 was not stored.\")\n  })\n})\n```\n\n## CAUTION\nif request method is eth_call, then this Lib re-request eth_sendTransaction with same params, for getting traceLogs.\nso that, in using this coverage tool, more gas is consumes. may `out of gas` error a lot of happen.\n\n## Demo\n![](https://user-images.githubusercontent.com/1563840/58031554-9b583380-7b5b-11e9-80ee-a87cead6d210.png)\n\n## Not yet support list\n- Solidity's Contract (maybe available, but not tested)\n\n## Licence\n[GPLv3](https://github.com/nakajo2011/contract-coverage/blob/master/LICENCE)\n\n## Author\n[nakajo2011](https://github.com/nakajo2011)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaintope%2Fcontract-coverager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaintope%2Fcontract-coverager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaintope%2Fcontract-coverager/lists"}