Skip to main content
Version: v6
Attention!You are viewing unreleased ink! 6 docs. Click here to view the latest docs.

Welcome Polkadot Scalability Hackathon participants!

On this page we explain how you can participate with ink! v6.

Read more about the hackathon here.

You need to use ink! v6!

caution

The current stable release of ink! (v5) is only compatible with WebAssembly and pallet-contracts. With v6 we are transitioning to pallet-revive and PolkaVM. pallet-revive is the execution environment for smart contracts on Kusama and Polkadot AssetHub.

ink! v6 is not yet released. This means you have to install our tools from the GitHub master branches and also depend on ink! master in your contracts Cargo.toml.


We did a writeup about this transition and the story behind it here. The chapter Technical Background of this documentation describes the larger architectural view.

For the documentation of ink! v6 you need to make sure you are viewing the v6 version:

If you already have an ink! v5 contract: there is a migration guide available here.

info

ink! v6 is still work in progress, there are still rough edges and possibly bugs.

You can find support in our Telegram group or open issues in our repositories.

Fast Track

Install Rust (>= 1.85) and cargo: Installation Guide.

Download the binary for a local development node here.

# Install our cli tool: `cargo-contract`.
# It wraps around Rust's `cargo build` to build contracts with optimal
# flags for blockchains. It also allows for deploying + interacting
# with contracts.
$ rustup component add rust-src
$ cargo install --locked --force --git https://github.com/use-ink/cargo-contract

# Create a simple contract.
$ cargo contract new flipper && cd flipper
$ cargo contract build --release

# Download our local development node.
# Find the binary here: https://github.com/use-ink/ink-node/releases/tag/v0.43.0

# Start your local development node in a separate shell session
$ ink-node

# Instantiate your contract on-chain.
$ cargo contract instantiate --suri //Alice

# Dry-run a call of it.
$ cargo contract call --suri //Alice --contract 0x… --message get

# Execute a contract call, as a transaction on-chain.
$ cargo contract call --suri //Alice --contract 0x… --message flip -x

Please see the chapter Getting started of this documentation for a deeper introduction.

Smart Contract Examples

You can find many contract examples in the v6 branch of our ink-examples repository.

Our "Hello, World!".
» view example

An ERC-20 implementation.
» view example


An upgradeable contract.
» view example

A multi-signature wallet.
» view example

Allow runtime access.
» view example