{"id":18401171,"url":"https://github.com/use-ink/link","last_synced_at":"2025-10-06T15:25:05.030Z","repository":{"id":66118616,"uuid":"484080906","full_name":"use-ink/link","owner":"use-ink","description":"Unstoppable URL shortener built with the ink! smart contract language.","archived":false,"fork":false,"pushed_at":"2024-04-29T08:36:26.000Z","size":4822,"stargazers_count":28,"open_issues_count":7,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-02T19:16:11.060Z","etag":null,"topics":["dapp","ink","smart-contracts","substrate","url-shortener","web-app"],"latest_commit_sha":null,"homepage":"https://tiny.ink","language":"TypeScript","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/use-ink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-04-21T14:19:47.000Z","updated_at":"2024-05-03T23:31:14.549Z","dependencies_parsed_at":"2024-02-21T12:25:51.326Z","dependency_job_id":"f9c7a6aa-4c23-4cd6-9520-b4be1d20b62c","html_url":"https://github.com/use-ink/link","commit_stats":null,"previous_names":["use-ink/link"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/use-ink%2Flink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/use-ink%2Flink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/use-ink%2Flink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/use-ink%2Flink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/use-ink","download_url":"https://codeload.github.com/use-ink/link/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247607785,"owners_count":20965946,"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":["dapp","ink","smart-contracts","substrate","url-shortener","web-app"],"created_at":"2024-11-06T02:37:54.836Z","updated_at":"2025-10-06T15:25:04.922Z","avatar_url":"https://github.com/use-ink.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./.images/header.png\" /\u003e\n\n# link! ‒ The Unstoppable URL Shortener\u003cbr/\u003e[![matrix][k1]] [![discord][l1]][l2] [![built-with-ink][i1]]\n\n\u003cbr clear=\"both\"/\u003e\n\n[k1]: https://img.shields.io/badge/matrix-chat-brightgreen.svg?style=flat\n[l1]: https://img.shields.io/discord/722223075629727774?style=flat-square\u0026label=discord\n[l2]: https://discord.com/invite/wGUDt2p\n[i1]: /.images/badge_flat.svg\n\nThis is an unstoppable URL shortener. It allows users to store a short version\nof a URL, this short (often mnemonic) version can be resolved back to the long\nversion.\n\nThe section [Why?](#-why) below contains more details on the distinction to\ntraditional URL shorteners.\n\nWe built this project to illustrate how a full-stack DApp can be built with:\n\n* __Smart Contract:__  [ink!](https://github.com/use-ink/ink) as the programming\n  language for the contract.\n* __Blockchain:__ We use the [Substrate blockchain framework](https://github.com/paritytech/substrate)\n  with it's module for smart contracts ([`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)).\n  You can use Substrate to build either standalone blockchains or parachains for Polkadot and Kusama.\n* __Frontend:__ For our MVP we use the `polkadot-js` API with hardcoded RPC and node URLs.\n\nIn our next iteration of this MVP we want to migrate the frontend to utilize\n[`substrate-connect`](https://github.com/paritytech/substrate-connect) under the hood.\nIn consequence the frontend would be truly trustless, there would then be no need to\nput trust in a server that e.g. the RPC return values are indeed what is stored on\nthe blockchain.\n\n## Rococo Deployment\n\nThe link! contract is deployed to Rococo at the following address:\n```\n5GdHQQkRHvEEE4sDkcLkxCCumSkw2SFBJSLKzbMTNARLTXz3\n```\nIts metadata can be [found here](./frontend/src/metadata.json). It is upgradeable by the\nchain's sudo account.\n\n## 🤔 Why?\n\nPopular URL shorteners are for-profit companies, relying on them to\ninfinitely store a URL can only be done by trusting those third parties\nto always adhere to their pinky promise.\n\nIn the past there have been a number of incidents where URL shorteners\nremoved the short URL at some point for a variety of reasons: commercial\ninterests, moral values, legal obligations, ….\n\nWe're not aware of incidents where URL shortener services maliciously\ndecided to change the resolved URL after the fact, but it's something\nthat can in principle be done.\nImportantly this could also be done without the companies intention.\nAn attacker could modify the company database and there would be no way\nfor a user to know that the short URL now resolves to something else.\n\n_Point being: you don't have any guarantee that the short URL will always\nbe resolved to the same long URL. You have to trust the central service._\n\nBlockchains allow us to build decentralized applications in a trustless\nmanner. A central ledger ensures that you can't simply edit a value,\nthe nodes in a blockchain network (often many thousands) have to come to\nconsensus on this change. You don't have to trust a central entity anymore\nthat it will always adhere to its promises. Instead you can put your trust\nin the underlying scientific mechanisms behind the blockchain network.\n\nWith this project we illustrate how our stack can be used\nto build a decentralized URL shortener where you don't have to put\ntrust in a singular entity.\n\n\n### Deploy\n\nIn `contracts` folder\n```sh\npnpm run script deploy\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuse-ink%2Flink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuse-ink%2Flink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuse-ink%2Flink/lists"}