{"id":13444349,"url":"https://github.com/OpShin/mockfrost","last_synced_at":"2025-03-20T18:32:15.463Z","repository":{"id":130903364,"uuid":"609339903","full_name":"OpShin/plutus-bench","owner":"OpShin","description":"A unified framework for Cardano Smart Contract testing and benchmarking m","archived":false,"fork":false,"pushed_at":"2024-04-13T17:06:11.000Z","size":2833,"stargazers_count":17,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T05:38:44.331Z","etag":null,"topics":["benchmark","cardano","plutus","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpShin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-03-03T22:43:18.000Z","updated_at":"2024-04-25T04:42:29.644Z","dependencies_parsed_at":"2024-04-25T04:52:37.861Z","dependency_job_id":null,"html_url":"https://github.com/OpShin/plutus-bench","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/OpShin%2Fplutus-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpShin%2Fplutus-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpShin%2Fplutus-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpShin%2Fplutus-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpShin","download_url":"https://codeload.github.com/OpShin/plutus-bench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221792892,"owners_count":16881289,"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":["benchmark","cardano","plutus","smart-contracts"],"created_at":"2024-07-31T04:00:20.531Z","updated_at":"2025-03-20T18:32:09.507Z","avatar_url":"https://github.com/OpShin.png","language":"Python","funding_links":[],"categories":["More"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"A person with the Cardano logo as face, lifting heavy weights\" src=\"plutus-bench.png\" width=\"240\" /\u003e\n\u003ch1\u003ePlutus-Bench\u003c/h1\u003e\n\u003c/div\u003e\n\nTest and benchmark Plutus Smart Contracts.\nThis project enables you to construct entire smart contract transactions against a mock environment, and measure the correctness (i.e. unit test) and performance of your smart contracts.\n\nPlutus Bench creates a mock ledger with an arbitrary UTxO set specified by the user.\nIt then hosts a mock blockfrost API to interact with the ledger, supporting popular off-chain tooling\nlike [translucent](https://github.com/antibody-cardano/translucent) and [pycardano](https://pycardano.readthedocs.io/en/latest/).\n\n\u003e Note: Plutus Bench is currently a Work In Progress, and is not yet ready for production use.\n\n### Why Plutus Bench?\n\n- **Compatability**: Plutus Bench is written in Python, and is compatible with popular off-chain tooling relying on BlockFrost APIs. Ogmios mocking is also planned.\n- **Holistic Testing**: Plutus Bench allows you to test the entire lifecycle of a smart contract, from minting to consuming, in a single test.\n- **Simple**: Plutus Bench is designed to be simple to use, and easy to integrate with your existing infrastructure.\n\n### Installation and running\n\n```bash\n# install the plutus-bench package\ngit clone https://github.com/OpShin/plutus-bench.git\ncd plutus-bench\n# install the package\npip install .\n# run the mock server\nuvicorn plutus_bench.mockfrost.server:app \n```\n\nAfter running these commands, a mock blockfrost server will be running on `http://localhost:8000`.\nHead to `http://localhost:8000/docs` to see the API documentation.\n\n### Usage\n\nGenerally the workflow is as follows:\n\n- Create a new session with the `/session/create` endpoint. You receive a session ID.\n- Initialize a BlockFrost client in your off-chain code, and point it to the mock server. The base url is `http://localhost:8000/\u003csession-id\u003e/api/v1`. Project id is not required.\n\nThat's it! You can now interact with the mock ledger using the BlockFrost client.\n\nYou may further manipulate the ledger using the `/\u003csession-id\u003e/ledger` endpoints.\n\n### Similar Projects\n\n- [lucid transaction emulator](https://lucid.spacebudz.io/) - Allows emulation of transactions on the Cardano blockchain. Only supports JavaScript and TypeScript.\n- [helios transaction emulator](https://github.com/hyperion-bt/helios) - Allows emulation of transactions on the Cardano blockchain. Only supports JavaScript and TypeScript.\n- [plutus simple model](https://github.com/mlabs-haskell/plutus-simple-model) - Allows evaluating Plutus smart contracts. Only supports Haskell.\n\n### What about the language comparison?\n\nThe language comparison has been moved to [contest](./contest).\nIt is planned to expand to cover different implementations of the same contract in different languages and the same language, tailored for performance optimizations.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpShin%2Fmockfrost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOpShin%2Fmockfrost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpShin%2Fmockfrost/lists"}