OpenViSTAI · Agents · Blockchain · Crypto
Menu
Smart Contracts

Ink Examples

Ink Examples is a repository of Rust ink! smart contract examples for Substrate, accompanied by React-based dApp examples. Developers can study contract patterns, build WebAssembly artifacts with cargo-contract, and start selected front ends locally with pnpm.

Independent OpenViST project profile, based on linked sources.

Ink Examples — OpenViST project profile in Smart Contracts.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when learning ink! contract development or when you need a documented example to build on and a corresponding local front-end example to explore.

Who it is for

  • Developers learning ink! and Substrate smart contract development.
  • Rust developers seeking example contracts to adapt.
  • Developers exploring React interfaces for contract interactions.

Documented uses

  • Study examples as a guide to building Substrate smart contracts with ink!.
  • Use contract patterns such as ERC-20, ERC-721, contract calling and transfers as prototype starting points.
  • Build an example into WebAssembly and metadata artifacts.
  • Run an included React dApp example locally to explore its interface.
Before you choose

Requirements & limits

The repository is public, and its examples are released into the public domain.

  • Contract compilation requires cargo-contract.
  • Front-end examples require Node.js, pnpm and a local dependency-install step.
  • The collection separates contract build instructions from front-end startup instructions.
  • The repository directs proposed new examples to the ink! repository's integration-tests/public folder.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Build an example contract and generate its artifacts

Compile one example contract and produce its WebAssembly and metadata files.

Before you start

  • Install cargo-contract.
  • Navigate to the root directory of the chosen smart contract.

Steps

  1. Install or update cargo-contract with the command below.

    Documented command
    cargo install cargo-contract --force
  2. From the example contract's root directory, run the command below.

    Documented command
    cargo contract build

Expected outcome

The contract's target folder contains an optimized `.wasm` file, `metadata.json`, and a `.contract` file that combines the Wasm and metadata for instantiation.

Guide limitations

  • This procedure builds the example and generates artifacts; it does not document contract instantiation.
Source-based practical guide

Run a React dApp example locally

Launch one of the included front-end examples in a local browser.

Before you start

  • Install Node.js and pnpm.
  • Use a listed example command, such as flipper.

Steps

  1. Install dependencies with pnpm i.

  2. Run an example with pnpm , such as pnpm flipper.

  3. Open http://localhost:5173 in a browser.

Expected outcome

The selected React dApp example is served locally in the browser.

Guide limitations

  • The repository documents local front-end startup; it does not describe deployment or a hosted service.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
9 October 2026
Original website title
use-ink/ink-examples · Official homepage title · retained in its source language