Skip to main content
Version: 6.x

Introduction

ink! is a programming language for smart contracts.

It's a domain-specific Rust language: contracts are normal Rust code.

We decided on Rust as it provides inherent safety-guarantees and a great performance. This translates to low user fees and makes it an ideal choice for scalable smart contracts.

You can use all the normal Rust tooling ‒ clippy, crates.io, IDE’s, etc.

Interoperability with Solidity contracts: Solidity developers can cross-contract call ink! contracts as if they were Solidity contracts.

You can deploy ink! to blockchains built with Polkadot SDK. See here for a list of chains that support us.

Fast Track

Install Rust and cargo: Installation Guide.

Download the binary for a local development node here.

# Install our cli tool.
# It wraps around `cargo build` to build contracts with optimal
# flags for blockchains. It also allows for deploying + interacting
# with contracts.
cargo install cargo-contract

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

# Instantiate this 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

Smart Contract Examples

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