{"id":15668040,"url":"https://github.com/naps62/ink-deployer","last_synced_at":"2025-09-20T11:04:55.730Z","repository":{"id":143330427,"uuid":"353122371","full_name":"naps62/ink-deployer","owner":"naps62","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-30T19:44:49.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T04:41:38.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/naps62.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,"publiccode":null,"codemeta":null}},"created_at":"2021-03-30T19:44:46.000Z","updated_at":"2021-04-14T02:32:54.000Z","dependencies_parsed_at":"2023-05-15T18:15:27.558Z","dependency_job_id":null,"html_url":"https://github.com/naps62/ink-deployer","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"2e2206c07cd2cce791d931c1580a48e7c401f7d6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naps62/ink-deployer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Fink-deployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Fink-deployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Fink-deployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Fink-deployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naps62","download_url":"https://codeload.github.com/naps62/ink-deployer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Fink-deployer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276085259,"owners_count":25582514,"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-09-20T02:00:10.207Z","response_time":63,"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-10-03T14:06:16.168Z","updated_at":"2025-09-20T11:04:55.709Z","avatar_url":"https://github.com/naps62.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ink deploy flow\n\nThis is a sub-component of a private project, published here to publish on\nPolkadot's Discord server\n\nSince it's just a copy\u0026paste from an existing project, it's not meant to be used\noutside of it (at least for now).\nSo there are a few assumptions it makes. If you want to adapt this to your\nproject, you'll need to tweak some things:\n\n1. **Assumes a particular directory structure**\n\nI assume a structure where a Cargo workspace exists with several child\ncontracts, which are compiled to `project/target/ink/\u003ccontract-name\u003e`\n\nCheck `lib/deploy.ts` to see the lines where contract artifacts are being read\nfrom hardcoded directories\n\n```\nproject\n|- Cargo.toml\n|- deployer/\n  |- this code\n|- target/\n  |- ink/\n    |- contract1\n      |- metadata.json\n      |- contract1.json\n    |- contract2\n      |- metadata.json\n      |- contract2.json\n```\n\n\n2. **Assumes canvas node is being used**\n\nIt's currently hardcoded to connect to `new WsProvider(\"ws://127.0.0.1:9944\");`\n\n3. **One instance of each contract, same name as contract itself**\n\nI intend to support use cases where many instances of the same contract are\nneeded (e.g.: one instance of `contract1`, two instances of `contract2`). Right\nnow, that's not supported, though\n\n4. **Uses a JSON file to keep track of state**\n\nThis file has two purposes:\n- Serve as output for the rest of the project to read the current address of\n    each contract\n- Serve as state, so that contracts already deployed are not duplicated\n\nThe last point implies that, if you want to re-deploy, you need to manually\ndelete this file.\n\nSample output:\n\n```\n{\n  \"code\": {\n    \"contract1\": \"0x88e19308ad408f4ccadee34323ce15f00480ca412ba5b327310c9c9e306447c7\",\n    \"contract2\": \"0x4d69808d3f244b8c66839821d5de40ca5ffc1cce38762d2dbb53f82304e3ee7e\"\n  },\n  \"contracts\": {\n    \"contract1\": \"5CvPjdprPZNmPAooYNCzWib9W5hkEE43zsLCrU83PxXrg7mL\",\n    \"contract2\": \"5DGYm5ReQF6j1kkAGZKzRZFCo1HjxX9qJH27U3Zekbvqhq7h\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaps62%2Fink-deployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaps62%2Fink-deployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaps62%2Fink-deployer/lists"}