Getting Started with ink! v6
This guide will walk you through getting started with ink! v6.
Last updated
Was this helpful?
This guide will walk you through getting started with ink! v6.
Last updated
Was this helpful?
Pop CLI introduces experimental support for ink! v6 smart contracts running on via pallet-revive
. This guide helps you transition from ink! v5 (WebAssembly) and start experimenting with ink! v6.
ink! v5: Version of the ink! that can be compiled into WebAssembly byte code and can be executed on virtual machine.
ink! v6: Version of ink! that can be compiled into RISC-V byte code and can be executed on PolkaVM ().
For more information about the benefits of RISC-V and pallet-revive
, see .
Pop CLI supports ink! v6 through the polkavm-contracts
feature flag.
To install it from the experimental branch, run:
⚠️ Note: Make sure you're using
Rust 1.85
or higher, older versions will fail to compile. You can check your version with rustc--version
.
The workflow for developing smart contracts remains similar to ink! v5. To get started, see our guide:.
If you already have an ink! smart contract, update your dependencies as follows:
Update your Cargo.toml
pallet_revive
enables the deployment and execution of PolkaVM smart contracts. It introduces support for 20-byte accounts (like EVM
), while most Polkadot-based chains use 32-byte accounts (AccountId32
). To ensure compatibility, pallet_revive
provides a mapping feature that lets 32-byte accounts seamlessly interact with the VM.
When first interacting with pallet_revive
, you must map your Polkadot account ID (32 bytes) to an Ethereum-compatible 20-byte address. This registration enables your account to interact with contracts.
Pop CLI will prompt you automatically:
Technical Support
For a complete example, check the .
Alternatively, you can interact on :
For further information about account mapping, including native EVM contract integration with Asset Hub, see .
in the ink! docs.
⭕ Detailed .
technical documentation.
Create a question and tag it with ""
Share the StackExchange question in our