Smart Contracts¶
Polkadot allows scalable execution of smart contracts, offering cross-chain compatibility and lower fees than legacy L1 platforms. Polkadot offers developers flexibility in building smart contracts, supporting both Solidity contracts executed either by the PolkaVM or by the EVM (Ethereum Virtual Machine), and Wasm-based contracts using ink! (written in Rust).
This section provides tools, resources, and guides for building and deploying smart contracts on parachains. Parachains are specialized blockchains connected to the relay chain, benefiting from shared security and interoperability. Depending on your language and environment preference, you can develop contracts using Wasm/ink! or EVM-based solutions.
Smart Contract Development Process¶
Follow this step-by-step process to develop and deploy smart contracts in the Polkadot ecosystem:
Choose a Smart Contract Platform
Select the platform that best fits your project requirements and development expertise:
- PolkaVM (Asset Hub) - Native smart contracts on Polkadot's system parachain
- EVM (Parachain-based) - Ethereum Virtual Machine compatibility on parachains
- Wasm (ink!) - WebAssembly contracts using Rust and ink!
Get Network Configuration Details
Configure your development environment with the appropriate network settings for your chosen platform:
- PolkaVM - Connect to Asset Hub
- EVM - Moonbeam Documentation, Astar Documentation, Acala Documentation
- Wasm (ink!) - depends on those parachains that implement pallet-contracts
, for more information check the ink! documentation
Set Up Your Development Environment
Install and configure the necessary tools and frameworks for your chosen smart contract platform:
- PolkaVM/EVM - Development Environments
- Wasm (ink!) - Development Environment Setup
Write, Compile, Test, and Deploy Your Contracts
Develop your smart contracts, test their functionality, and deploy them to your chosen network:
- PolkaVM/EVM - Solidity Development Guide
- Wasm (ink!) - ink! Contract Structure
Interact With Your Deployed Contracts
Utilize libraries and tools to interact with your deployed smart contracts and integrate them into applications:
- PolkaVM/EVM - Contract Libraries
- Wasm (ink!) - Contract Interaction