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

Introduction

⚡️ use.ink helps you easily build safe, efficient smart contracts for Polkadot and Substrate-based blockchains.

🚀 Write smart contracts in ink!, a domain-specific language built on top of Rust — combining safety, performance, and scalability.

🛠 Use familiar Rust tooling like clippy, cargo, crates from crates.io, and popular IDEs for a seamless development experience.

🤝 Interoperability with Solidity: Solidity developers can call ink! contracts just like other Solidity contracts, enabling cross-ecosystem collaboration.

caution

The latest release, v6.0.0-alpha, is an alpha version.

ink! v6.0.0 introduces support for both native ink! and Solidity ABI specifications.
However, Solidity compatibility is still under development and may be incomplete or unstable in this alpha release.

🌎 Deploy ink! smart contracts on blockchains built with the Polkadot SDK. Check supported chains here.

note

ink! v6 is no longer using WebAssembly and pallet-contracts! Instead we migrated to RISC-V, PolkaVM, and pallet-revive.

Read more about the transition here.

Fast Track

Install Rust and cargo: Installation Guide.

Download the binary for a local development node here.

# Install our cli tool from the `6.0.0-alpha` release.
# It wraps around `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 cargo-contract@6.0.0-alpha

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

# Start your local development node in a separate shell session
$ chmod +x ink-node (makes the node's binary executable)
$ ink-node (starts the node, try `./ink-node` if the previous command doesn't work)

# Instantiate this contract on-chain.
$ cargo contract instantiate --suri //Alice --args true -x

# 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

Using the Contracts UI

caution

The Contracts UI for ink! v6 uses an alpha version of the interface: https://inkv6alpha.netlify.app/.


Where to Deploy your Ink!v6 Contracts

chains
chains

Coming soon

To deploy a contract to the Westend Asset Hub, you must get WND tokens. To do so, you can use the Westend Faucet. You need to specify the address where you want to receive the tokens from the faucet.

For an overview of all currently supported chains, check the supported chains here.

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