{"id":18499317,"url":"https://github.com/clearloop/inkpad","last_synced_at":"2025-08-24T22:33:40.656Z","repository":{"id":44712858,"uuid":"345029668","full_name":"clearloop/inkpad","owner":"clearloop","description":"Run ink! contract anywhere.","archived":false,"fork":false,"pushed_at":"2022-01-29T10:11:04.000Z","size":5296,"stargazers_count":6,"open_issues_count":15,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-20T14:51:49.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clearloop.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":"2021-03-06T07:07:21.000Z","updated_at":"2025-02-16T15:33:18.000Z","dependencies_parsed_at":"2022-09-17T08:01:40.444Z","dependency_job_id":null,"html_url":"https://github.com/clearloop/inkpad","commit_stats":null,"previous_names":["patractlabs/ceres"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/clearloop/inkpad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearloop%2Finkpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearloop%2Finkpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearloop%2Finkpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearloop%2Finkpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clearloop","download_url":"https://codeload.github.com/clearloop/inkpad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearloop%2Finkpad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271760343,"owners_count":24816400,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-06T13:45:27.628Z","updated_at":"2025-08-24T22:33:40.598Z","avatar_url":"https://github.com/clearloop.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003e\nInkpad\n\u003c/h1\u003e\n\n[![crate][a1]][a2] [![docs][c1]][c2] [![downloads][d1]][d2] [![LICENSE][e1]][e2] \n\n[a1]: https://img.shields.io/crates/v/inkpad-runtime.svg\n[a2]: https://crates.io/crates/inkpad-runtime\n[c1]: https://img.shields.io/badge/current-docs-brightgreen.svg\n[c2]: https://docs.rs/inkpad-runtime\n[d1]: https://img.shields.io/crates/d/inkpad-runtime.svg\n[d2]: https://crates.io/crates/inkpad-runtime\n[e1]: https://img.shields.io/crates/l/inkpad-runtime.svg\n[e2]: https://choosealicense.com/licenses/apache-2.0/\n\n \u003ch3\u003e\n    \u003ca href=\"https://patractlabs.github.io/inkpad/\"\u003eGuide\u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"./README_ZH.md\"\u003eChinese\u003c/a\u003e\n\u003c/h3\u003e\n\n\u003c/div\u003e\n\n## Play with it\n\nThe Inkpad CLI can be installed with:\n\n```\ncargo install inkpad-cli\n```\n\nWe can use the `inkpad` binary to explore the usages of inkpad library.\n\n```\ninkpad 0.2.0\nInkpad command tool\n\nUSAGE:\n    inkpad [*.contract | name | code-hash] \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nARGS:\n    \u003c*.contract | name | code-hash\u003e    If empty, inkpad will load the last contract which has been executed\n\nSUBCOMMANDS:\n    call      Calls a call method\n    deploy    Calls a deploy method\n    help      Prints this message or the help of the given subcommand(s)\n    info      Prints info of *.contract\n    list      Lists all contracts\n```\n\n## Features\n\n* **lightweight**. Inkpad is a standalone ink! contract environment that scales with your needs, \nInkpad can be embedded into almost any application.\n* **debugging**. Inkpad built with the traps handlers of both `wasmi` and `wasmtime`, it supports\ncatching the traps of the wasm binary of ink! contracts\n* **tests**. With Inkpad, you can write tests of ink! contract with full-features of the chain api\n* **customized**. The runtime of inkpad works with various of rust `trait` that we can configure it \nblazing flexible.\n\n\n## Platform Support\n\nYou can use Inkpad from a variety of different platforms:\n\n* Rust - the [inkpad-runtime][inkpad-runtime] crate\n* Browser - the [inkpad-browser][inkpad-browser] crate\n* Command Line - the [inkpad-cli][inkpad-cli] crate\n\n## Example\n\n```rust\n// test flipper.contract\nuse inkpad_ri::Instance;\nuse inkpad_runtime::Runtime;\nuse parity_scale_codec::Encode;\n\n#[test]\nfn test_flipper() {\n    let mut rt = Runtime::contract(\n        include_bytes!(\"./flipper.contract\"),\n        Some(Instance),\n    )\n    .expect(\"Create runtime failed\");\n\n    rt.deploy(\"default\", vec![], None).expect(\"Deploy failed\");\n    assert_eq!(rt.call(\"get\", vec![], None), Ok(Some(vec![0])));\n\n    rt.deploy(\"new\", vec![true.encode()], None)\n        .expect(\"Deploy failed\");\n    assert_eq!(rt.call(\"get\", vec![], None), Ok(Some(vec![1])));\n\n    rt.call(\"flip\", vec![], None).expect(\"Call contract failed\");\n    assert_eq!(rt.call(\"get\", vec![], None), Ok(Some(vec![0])));\n}\n```\n\n## How it works\n\nInkpad extracted from `sp-sandbox` and `pallet-contracts` of substrate\nwith both `wasmi` and `wasmtime` features, plus trap handlers for the\ntwo executors.\n\nIt abstracts the chain environment which ink! contracts requires so\nthat we can embed inkpad almost any applications to run ink! contracts.\n\n\n---\n\nRun ink! contract anywhere!\n\n\n[inkpad-runtime]: https://github.com/patractlabs/inkpad/tree/master/crates/runtime\n[inkpad-browser]: https://github.com/patractlabs/inkpad/tree/master/browser\n[inkpad-cli]: https://github.com/patractlabs/inkpad/tree/master/cli\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearloop%2Finkpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclearloop%2Finkpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearloop%2Finkpad/lists"}