{"id":13651969,"url":"https://github.com/halva-suite/halva","last_synced_at":"2025-04-23T02:32:01.646Z","repository":{"id":40714756,"uuid":"276251669","full_name":"halva-suite/halva","owner":"halva-suite","description":"Halva is a toolchain for improving the experience of developing Decentralized Applications based on Substrate.","archived":false,"fork":false,"pushed_at":"2022-12-30T20:46:01.000Z","size":3834,"stargazers_count":35,"open_issues_count":17,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T19:06:20.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/halva-suite.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":"2020-07-01T01:55:39.000Z","updated_at":"2025-02-27T18:26:33.000Z","dependencies_parsed_at":"2023-01-31T16:15:27.497Z","dependency_job_id":null,"html_url":"https://github.com/halva-suite/halva","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halva-suite%2Fhalva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halva-suite%2Fhalva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halva-suite%2Fhalva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halva-suite%2Fhalva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halva-suite","download_url":"https://codeload.github.com/halva-suite/halva/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250357693,"owners_count":21417329,"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":[],"created_at":"2024-08-02T02:00:53.881Z","updated_at":"2025-04-23T02:32:01.295Z","avatar_url":"https://github.com/halva-suite.png","language":"TypeScript","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/halva-suite/halva\"\u003e\n    \u003cimg src=\"https://avatars2.githubusercontent.com/u/67451441?s=400\u0026u=16f743b727e0d20fb8883c9794a87c9d5732fe67\u0026v=4\" alt=\"Logo\" width=\"100\" height=\"100\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eHalva Suite\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    ⚠️ (Work In Progress)\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/halva-suite/halva/blob/master/docs/commands.md\"\u003eDocs\u003c/a\u003e |\n    \u003ca href=\"https://github.com/halva-suite/halva/issues\"\u003eReport Bug\u003c/a\u003e |\n    \u003ca href=\"https://github.com/halva-suite/halva/issues\"\u003eRequest Feature\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cp align=\"center\"\u003e\u003cb\u003e🔥 ATTENTION 🔥\u003c/br\u003e The module has been tested on Substrate \u003cins\u003e2.0.0-rc6\u003c/ins\u003e version, work on other versions is not guaranteed\u003c/b\u003e\u003c/p\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/w3f/General-Grants-Program/aa16ee2840c3ea169352ca3c35e42d8e4d483110/src/badge_black.svg\" alt=\"w3f\" width=\"400\"\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nInspired by [Truffle](https://github.com/trufflesuite/truffle)\n\nHalva is a toolchain for developing Decentralized Applications based on Substrate. It provides a high-level way to configure a development environment, interact with Substrate through external API and writing your test cases. Halva targets testing extrinsics via RPC calls this allows test Substrate (or clients compatible with Substrate RPC) as a black-box.\n\n### Built With\nHalva uses [Polkadot.js](https://github.com/polkadot-js)\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n1. Install `halva-cli`\n```sh\nnpm install -g halva-cli\n```\n\n2. Configure your network in `halva.js`\n```JS\nconst mnemonic = \"bottom drive obey lake curtain smoke basket hold race lonely fit walk\";\n\nmodule.exports = {\n  networks: {\n    test: {\n      mnemonic,\n      ws: \"ws://127.0.0.1:9944\",\n    },\n  },\n  polkadotjs: {\n    provider: { },\n    types: { }\n   },\n}\n\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nTo run all tests, run:\n\n```sh\nhalva-cli test  -p /path/to/tests/folder -n networkName\n```\nIf you need help, use\n\n```sh\nhalva-cli --help\n```\n\nTo run REPL, simple run:\n\n```sh\nhalva-cli console\n```\n\n## Test global scope\n\n  You can use global variables provided by halva\n\n```js\ndescribe('Halva test', () =\u003e {\n\n  describe('test global', () =\u003e {\n    it('Get global var', async () =\u003e {\n        console.log(halva.accounts[0].address); // halva_account global var\n    });\n  });\n});\n```\n\n### Variable list:\n* `halva.accounts` - 10 Keyring pairs for tests\n* `halva.polkadot` - ApiPromise object of polkadot\n* `alicePair` - KeyringPair object of Alice\n* `bobPair` - KeyringPair object of Bob\n* `charliePair` - KeyringPair object of Charlie\n* `networkName` - Current network name\n* `chainMetadata` - Metadata object \n* `mochaConfigure` - Current Mocha configuration object\n\n## Assertions\n\n`Halva` has its own assertion for working with `extrinsic` and `contracts` (in the future)\n\n### Assertion list: \n\n* `passes(asyncFn, message, signer)` - Error if extrinsic call fails\n* `eventEmitted(asyncFn, eventName, section, message, signer)` - Error if the event was not emitted in the transaction\n* `eventNotEmitted(asyncFn, eventName, section, message, signer)` - Error if the event was emitted in a transaction\n* `fails(asyncFn, errorName, module, signer, message)` - Error if the call ended without errors or with some other error\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\nSee the [open issues](https://github.com/halva-suite/halva/issues) for a list of proposed features (and known issues).\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nProject Link: [https://github.com/halva-suite/halva](https://github.com/halva-suite/halva)\n\n\u003ca href=\"http://wintex.pro/\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://github.com/halva-suite/assets/blob/master/wintex.png?raw=true\" width=\"200\" /\u003e\n\u003c/a\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[wintex-url]: http://wintex.pro/\n[wintex-logo]: https://github.com/halva-suite/assets/blob/master/wintex.png?raw=true\n[contributors-shield]: https://img.shields.io/github/contributors/halva-suite/halva.svg?style=flat-square\n[contributors-url]: https://github.com/halva-suite/halva/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/halva-suite/halva.svg?style=flat-square\n[forks-url]: https://github.com/halva-suite/halva/network/members\n[stars-shield]: https://img.shields.io/github/stars/halva-suite/halva.svg?style=flat-square\n[stars-url]: https://github.com/halva-suite/halva/stargazers\n[issues-shield]: https://img.shields.io/github/issues/halva-suite/halva.svg?style=flat-square\n[issues-url]: https://github.com/halva-suite/halva/issues\n[license-shield]: https://img.shields.io/github/license/halva-suite/halva.svg?style=flat-square\n[license-url]: https://github.com/halva-suite/halva/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/othneildrew\n[product-screenshot]: images/screenshot.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalva-suite%2Fhalva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalva-suite%2Fhalva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalva-suite%2Fhalva/lists"}