{"id":22799988,"url":"https://github.com/tangle-network/protocol-ink","last_synced_at":"2025-04-19T16:52:54.257Z","repository":{"id":37249810,"uuid":"457081958","full_name":"tangle-network/protocol-ink","owner":"tangle-network","description":"Webb Protocol implementation in Ink!","archived":false,"fork":false,"pushed_at":"2022-08-30T00:46:42.000Z","size":155946,"stargazers_count":5,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-09T22:29:43.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://webb-tools.github.io/protocol-ink/","language":"Rust","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/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-08T19:51:54.000Z","updated_at":"2023-08-16T05:31:30.000Z","dependencies_parsed_at":"2022-07-13T12:11:03.784Z","dependency_job_id":null,"html_url":"https://github.com/tangle-network/protocol-ink","commit_stats":null,"previous_names":["tangle-network/protocol-ink","webb-tools/protocol-ink"],"tags_count":null,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-ink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-ink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-ink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-ink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/protocol-ink/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229345342,"owners_count":18058474,"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-12-12T07:10:42.929Z","updated_at":"2024-12-12T07:10:43.975Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003eWebb Protocol ink! Contracts 🕸️ \u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://www.webb.tools/\"\u003e\n    \u003cimg alt=\"Webb Logo\" src=\".github/assets/webb-icon.svg\" width=\"15%\" height=\"30%\" /\u003e\n  \u003c/a\u003e\n  \u003c/div\u003e\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003e🚀 Webb's ink! Smart Contract Implementation 🚀\u003c/strong\u003e\n    \u003cbr /\u003e\n    \u003csub\u003e ⚠️ Beta Software ⚠️ \u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\" \u003e\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/webb-tools/protocol-ink/CI?style=flat-square)](https://github.com/webb-tools/protocol-ink/actions)\n[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Built with ink!](https://raw.githubusercontent.com/paritytech/ink/master/.images/badge_flat.svg)](https://github.com/paritytech/ink)\n[![Twitter](https://img.shields.io/twitter/follow/webbprotocol.svg?style=flat-square\u0026label=Twitter\u0026color=1DA1F2)](https://twitter.com/webbprotocol)\n[![Telegram](https://img.shields.io/badge/Telegram-gray?logo=telegram)](https://t.me/webbprotocol)\n[![Discord](https://img.shields.io/discord/833784453251596298.svg?style=flat-square\u0026label=Discord\u0026logo=discord)](https://discord.gg/cv8EfJu3Tn)\n\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003ch2 id=\"table-of-contents\"\u003e 📖 Table of Contents\u003c/h2\u003e\n\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"#start\"\u003e Getting Started\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#compile\"\u003eCompiling\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#test\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contribute\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e  \n\u003c/details\u003e\n\n\u003ch2 id=\"start\"\u003e Getting Started  🎉 \u003c/h2\u003e\n\nFor additional information, please refer to the [Webb Protocol-ink! Rust Docs](https://webb-tools.github.io/protocol-ink/) 📝. Have feedback on how to improve protocol-ink? Or have a specific question to ask? Checkout the [Anchor Protocol Feedback Discussion](https://github.com/webb-tools/feedback/discussions/categories/anchor-protocol) 💬.\n\nLooking for additional ink! documentation and deployment tools? \n\n[ink! Documentation Portal](https://ink.substrate.io)\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\n[Developer Documentation](https://paritytech.github.io/ink/ink_lang/)\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\n[ink! Deployment UI](https://paritytech.github.io/contracts-ui/#/instantiate)\n\n### Project layout\n\n```\n/\n  |____contracts/   # Contains all ink! smart contracts, including governed token wrapper, mixer, vanchor, and poseidon contracts\n  |____scripts/     # Dedicated directory for useful scripts, currently holds the `deploy.ts` script for easy deployments\n  |____tests/       # Contains all integration tests for ink! contracts (e.g. `mixer_tests.ts`, `tokenWrapper.test.ts`)\n```\n\n\u003ch2 id=\"start\"\u003e Prerequisites  🎉 \u003c/h2\u003e\n\nThis repository makes use of node.js, yarn, Rust, and requires version 16. To install node.js binaries, installers, and source tarballs, please visit https://nodejs.org/en/download/. Once node.js is installed you may proceed to install [`yarn`](https://classic.yarnpkg.com/en/docs/install):\n\n```\nnpm install --global yarn\n```\n\nGreat! Now your **Node** environment is ready! 🚀🚀\n\nA prerequisite for compiling smart contracts is to have Rust and Cargo installed. We suggest using \u003chttps://rustup.rs\u003e installer and the `rustup` tool to manage the Rust toolchain.\n\nFirst install and configure `rustup`:\n\n```bash\n# Install\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n# Configure\nsource ~/.cargo/env\n```\n\nConfigure the Rust toolchain to default to the latest nightly version, and add the nightly wasm target:\n\n```bash\nrustup default nightly\nrustup update\nrustup update nightly\nrustup component add rust-src --toolchain nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n```\n\nGreat! Now your Rust environment is ready! 🚀🚀\n\nInstall `dylint-link`, required to lint ink! contracts, warning you about things like using API's in a way that could lead to security issues.\\\n\n```\ncargo install dylint-link --locked\n```\n\nWe recommend installing [`cargo-contract`](https://github.com/paritytech/cargo-contract) as well.\nIt's a CLI tool which helps set up and manage WebAssembly smart contracts written with ink!:\n\n```\ncargo install cargo-contract --force\n```\n\nUse the `--force` to ensure you are updated to the most recent `cargo-contract` version.\n\n\u003ch2 id=\"compile\"\u003e Compiling 💻 \u003c/h2\u003e\n\nOnce the development environment is set up, lets compile some contracts:\n\n```\nnpx redpost compile\n```\n\nOr optionally for each contract:\n```\ncargo contract build\n```\n\n\u003ch2 id=\"test\"\u003e Testing 🧪 \u003c/h2\u003e\n\nRunning the test suite requires installing a fork of Parity's substrate contract node, you will need to clone and build Webb's substrate contract node.\n\n```\n# Clone the forked repo\ngit clone git@github.com:webb-tools/substrate-contracts-node.git\n\n# Install contracts node\ncargo install contracts-node --git https://github.com/webb-tools/substrate-contracts-node.git --force --locked\n```\nThe `--locked` flag makes the installation use the same versions as the `Cargo.lock` in those repositories ‒ ensuring that the last known-to-work version of the dependencies are used. \n\nThe reason for utilizing a fork is that we have made specific changes to fit our needs in the `ChainExtension`, you may see those changes in this commit [7462b](https://github.com/webb-tools/substrate-contracts-node/commit/7462b5cc97a801ea09fc9ea24c337017bb63183b).\n\nTo run a local dev node execute:\n\n```\nsubstrate-contracts-node --dev\n```\n\nIn another terminal, install the dependencies: \n\n```\nyarn install\n```\n\nBuild all the contracts:\n\n```\nyarn build\n```\n\nRun test suite:\n\n```\nyarn test\n```\n\n\u003ch2 id=\"contribute\"\u003e Contributing \u003c/h2\u003e\n\nInterested in contributing to the Webb Relayer Network? Thank you so much for your interest! We are always appreciative for contributions from the open-source community!\n\nIf you have a contribution in mind, please check out our [Contribution Guide](./.github/CONTRIBUTING.md) for information on how to do so. We are excited for your first contribution!\n\n\u003ch2 id=\"license\"\u003e License \u003c/h2\u003e\n\nLicensed under \u003ca href=\"LICENSE\"\u003eApache 2.0 license\u003c/a\u003e.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache 2.0 license, shall be licensed as above, without any additional terms or conditions.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fprotocol-ink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fprotocol-ink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fprotocol-ink/lists"}