You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Summary: Learn about smart contract development capabilities in the Polkadot ecosystem, either by leveraging Polkadot Hub or other alternatives.
2227
+
- Summary: Learn about smart contract development on Polkadot Hub with native PolkaVM support, dual-VM execution, and seamless cross-chain capabilities.
2228
2228
2229
-
# Smart Contracts on Polkadot
2229
+
# Smart Contracts on Polkadot Hub
2230
2230
2231
2231
## Introduction
2232
2232
2233
-
Polkadot offers developers multiple approaches to building and deploying smart contracts within its ecosystem. As a multi-chain network designed for interoperability, Polkadot provides various environments optimized for different developer preferences and application requirements. From native smart contract support on Polkadot Hub to specialized parachain environments, developers can choose the platform that best suits their technical needs whilebenefiting from Polkadot's shared security model and cross-chain messaging capabilities.
2233
+
Polkadot Hub provides a production-ready smart contract platform that combines Ethereum compatibility with the performance and cross-chain capabilities of the Polkadot ecosystem. Developers can deploy smart contracts directly on Polkadot Hub whileusing familiar Ethereum tooling, workflows, and programming languages.
2234
2234
2235
-
Whether you're looking for Ethereum compatibility through EVM-based parachains like [Moonbeam](https://docs.moonbeam.network/){target=\_blank}, [Astar](https://docs.astar.network/){target=\_blank}, and [Acala](https://evmdocs.acala.network/){target=\_blank} or prefer PolkaVM-based development with [ink!](https://use.ink/docs/v6/){target=\_blank}, the Polkadot ecosystem accommodates a range of diverse developers.
2235
+
Built with a dual-VM approach, Polkadot Hub offers two execution backends: REVM for unmodified EVM compatibility and native PolkaVMfor optimized computationally expensive workloads. This dual-VM architecture enables developers to migrate existing Ethereum contracts instantly or optimize for speed and efficiency with native execution.
2236
2236
2237
-
These guides explore the diverse smart contract options available in the Polkadot ecosystem, helping developers understand the unique advantages of each approach and make informed decisions about where to deploy their decentralized applications.
2237
+
## Why Build on Polkadot Hub
2238
2238
2239
-
## Native Smart Contracts
2239
+
### Ethereum Compatibility
2240
2240
2241
-
### Introduction
2241
+
Deploy existing Ethereum contracts with zero modifications while maintaining full compatibility with your existing development stack:
2242
2242
2243
-
Polkadot Hub enables smart contract deployment and execution through PolkaVM, a cutting-edge virtual machine designed specifically for the Polkadot ecosystem. This native integration allows developers to deploy smart contracts directly on Polkadot's system chain while maintaining compatibility with Ethereum development tools and workflows.
2243
+
- **Complete JSON-RPC API support**: Use MetaMask, Hardhat, Remix, Foundry, and all standard Ethereum tooling.
2244
+
- **Standard libraries**: Integrate Ethers.js, Web3.js, Viem, Wagmi, and Web3.py without changes.
2245
+
- **Solidity development**: Write contracts in Solidity or migrate existing code directly.
2246
+
- **Familiar workflows**: Maintain your existing deployment, testing, and monitoring processes.
2244
2247
2245
-
### Smart Contract Development
2248
+
### Performance Options
2246
2249
2247
-
The smart contract platform on Polkadot Hub combines _Polkadot's robust security and scalability_ with the extensive Ethereum development ecosystem. Developers can utilize familiar Ethereum libraries for contract interactions and leverage industry-standard development environments for writing and testing smart contracts.
2250
+
Choose between two execution backends:
2248
2251
2249
-
Polkadot Hub provides _full Ethereum JSON-RPC API compatibility_, ensuring seamless integration with existing development tools and services. This compatibility enables developers to maintain their preferred workflows while building on Polkadot's native infrastructure.
2252
+
- **REVM**: Run unmodified Ethereum contracts with full EVM/Ethereum compatibility.
2253
+
- **PolkaVM**: Compile to optimized RISC-V bytecode for enhanced performance and lower fees while keeping Ethereum-compatibility.
2250
2254
2251
-
### Technical Architecture
2255
+
Both backends share the same RPC interface and tooling support, allowing seamless transitions. In addition, smart contracts can interact with Polkadot native services via [precompile contracts](/smart-contracts/precompiles/){target=\_blank}.
2252
2256
2253
-
PolkaVM, the underlying virtual machine, utilizes a RISC-V-based register architecture _optimized for the Polkadot ecosystem_. This design choice offers several advantages:
2257
+
### Cross-VM & Cross-Chain Capabilities
2254
2258
2255
-
- Enhanced performance for smart contract execution.
2256
-
- Improved gas efficiency for complex operations.
2257
-
- Native compatibility with Polkadot's runtime environment.
2258
-
- Optimized storage and state management.
2259
+
Smart contracts written for one VM (for example, EVM) can interact directly with other smart contracts written for the RISC-V PolkaVM, and back. This allows to use full EVM compatible contracts but extend to heavy/complex execution workloads to the PolkaVM RISC-V backend.
2259
2260
2260
-
### Development Tools and Resources
2261
-
2262
-
Polkadot Hub supports a comprehensive suite of development tools familiar to Ethereum developers. The platform integrates with popular development frameworks, testing environments, and deployment tools. Key features include:
2263
-
2264
-
- Contract development in Solidity or Rust.
2265
-
- Support for standard Ethereum development libraries.
2266
-
- Integration with widely used development environments.
2267
-
- Access to blockchain explorers and indexing solutions.
2268
-
- Compatibility with contract monitoring and management tools.
2269
-
2270
-
### Cross-Chain Capabilities
2271
-
2272
-
Smart contracts deployed on Polkadot Hub can leverage Polkadot's [cross-consensus messaging (XCM) protocol](/parachains/interoperability/get-started/){target=\_blank} protocol to seamlessly _transfer tokens and call functions on other blockchain networks_ within the Polkadot ecosystem, all without complex bridging infrastructure or third-party solutions.
2273
-
2274
-
### Use Cases
2275
-
2276
-
Polkadot Hub's smart contract platform is suitable for a wide range of applications:
- Governance systems integrated with Polkadot's democracy mechanisms.
2281
-
- Cross-chain bridges and asset management solutions.
2261
+
Furthermore, all smart contracts in Polkadot Hub can interact with any service in the Polkadot ecosystem through [XCM](/smart-contracts/precompiles/xcm/){target=\_blank}, enabling token transfers, remote execution, and cross-chain composability without bridges or intermediaries.
2282
2262
2283
2263
## Other Smart Contract Environments
2284
2264
@@ -2288,32 +2268,41 @@ Beyond Polkadot Hub's native PolkaVM support, the ecosystem offers two main alte
2288
2268
2289
2269
- **Rust (ink!)**: ink! is a Rust-based framework that can compile to PolkaVM. It uses [`#[ink(...)]`](https://use.ink/docs/v6/macros-attributes/){target=\_blank} attribute macros to create Polkadot SDK-compatible PolkaVM bytecode, offering strong memory safety from Rust, an advanced type system, high-performance PolkaVM execution, and platform independence with sandboxed security.
2290
2270
2271
+
## Next Steps
2272
+
2273
+
<div class="grid cards" markdown>
2291
2274
2292
-
Each environment provides unique advantages based on developer preferences and application requirements.
Developers can use their existing Ethereum development tools and connect to Polkadot Hub's RPC endpoints. The platform's Ethereum compatibility layer ensures a smooth transition forteams already building on Ethereum-compatible chains.
2279
+
Quick-start guides forconnecting, deploying, and building your first smart contract.
2297
2280
2298
-
Subsequent sections of this guide provide detailed information about specific development tools, advanced features, and best practices for building on Polkadot Hub.
2281
+
[:octicons-arrow-right-24: Get Started](/smart-contracts/get-started/)
- Summary: Learn about smart contract development capabilities in the Polkadot ecosystem, either by leveraging Polkadot Hub or other alternatives.
3408
+
- Summary: Learn about smart contract development on Polkadot Hub with native PolkaVM support, dual-VM execution, and seamless cross-chain capabilities.
3409
3409
3410
-
# Smart Contracts on Polkadot
3410
+
# Smart Contracts on Polkadot Hub
3411
3411
3412
3412
## Introduction
3413
3413
3414
-
Polkadot offers developers multiple approaches to building and deploying smart contracts within its ecosystem. As a multi-chain network designed for interoperability, Polkadot provides various environments optimized for different developer preferences and application requirements. From native smart contract support on Polkadot Hub to specialized parachain environments, developers can choose the platform that best suits their technical needs whilebenefiting from Polkadot's shared security model and cross-chain messaging capabilities.
3414
+
Polkadot Hub provides a production-ready smart contract platform that combines Ethereum compatibility with the performance and cross-chain capabilities of the Polkadot ecosystem. Developers can deploy smart contracts directly on Polkadot Hub whileusing familiar Ethereum tooling, workflows, and programming languages.
3415
3415
3416
-
Whether you're looking for Ethereum compatibility through EVM-based parachains like [Moonbeam](https://docs.moonbeam.network/){target=\_blank}, [Astar](https://docs.astar.network/){target=\_blank}, and [Acala](https://evmdocs.acala.network/){target=\_blank} or prefer PolkaVM-based development with [ink!](https://use.ink/docs/v6/){target=\_blank}, the Polkadot ecosystem accommodates a range of diverse developers.
3416
+
Built with a dual-VM approach, Polkadot Hub offers two execution backends: REVM for unmodified EVM compatibility and native PolkaVMfor optimized computationally expensive workloads. This dual-VM architecture enables developers to migrate existing Ethereum contracts instantly or optimize for speed and efficiency with native execution.
3417
3417
3418
-
These guides explore the diverse smart contract options available in the Polkadot ecosystem, helping developers understand the unique advantages of each approach and make informed decisions about where to deploy their decentralized applications.
3418
+
## Why Build on Polkadot Hub
3419
3419
3420
-
## Native Smart Contracts
3420
+
### Ethereum Compatibility
3421
3421
3422
-
### Introduction
3422
+
Deploy existing Ethereum contracts with zero modifications while maintaining full compatibility with your existing development stack:
3423
3423
3424
-
Polkadot Hub enables smart contract deployment and execution through PolkaVM, a cutting-edge virtual machine designed specifically for the Polkadot ecosystem. This native integration allows developers to deploy smart contracts directly on Polkadot's system chain while maintaining compatibility with Ethereum development tools and workflows.
3424
+
- **Complete JSON-RPC API support**: Use MetaMask, Hardhat, Remix, Foundry, and all standard Ethereum tooling.
3425
+
- **Standard libraries**: Integrate Ethers.js, Web3.js, Viem, Wagmi, and Web3.py without changes.
3426
+
- **Solidity development**: Write contracts in Solidity or migrate existing code directly.
3427
+
- **Familiar workflows**: Maintain your existing deployment, testing, and monitoring processes.
3425
3428
3426
-
### Smart Contract Development
3429
+
### Performance Options
3427
3430
3428
-
The smart contract platform on Polkadot Hub combines _Polkadot's robust security and scalability_ with the extensive Ethereum development ecosystem. Developers can utilize familiar Ethereum libraries for contract interactions and leverage industry-standard development environments for writing and testing smart contracts.
3431
+
Choose between two execution backends:
3429
3432
3430
-
Polkadot Hub provides _full Ethereum JSON-RPC API compatibility_, ensuring seamless integration with existing development tools and services. This compatibility enables developers to maintain their preferred workflows while building on Polkadot's native infrastructure.
3433
+
- **REVM**: Run unmodified Ethereum contracts with full EVM/Ethereum compatibility.
3434
+
- **PolkaVM**: Compile to optimized RISC-V bytecode for enhanced performance and lower fees while keeping Ethereum-compatibility.
3431
3435
3432
-
### Technical Architecture
3436
+
Both backends share the same RPC interface and tooling support, allowing seamless transitions. In addition, smart contracts can interact with Polkadot native services via [precompile contracts](/smart-contracts/precompiles/){target=\_blank}.
3433
3437
3434
-
PolkaVM, the underlying virtual machine, utilizes a RISC-V-based register architecture _optimized for the Polkadot ecosystem_. This design choice offers several advantages:
3438
+
### Cross-VM & Cross-Chain Capabilities
3435
3439
3436
-
- Enhanced performance for smart contract execution.
3437
-
- Improved gas efficiency for complex operations.
3438
-
- Native compatibility with Polkadot's runtime environment.
3439
-
- Optimized storage and state management.
3440
+
Smart contracts written for one VM (for example, EVM) can interact directly with other smart contracts written for the RISC-V PolkaVM, and back. This allows to use full EVM compatible contracts but extend to heavy/complex execution workloads to the PolkaVM RISC-V backend.
3440
3441
3441
-
### Development Tools and Resources
3442
-
3443
-
Polkadot Hub supports a comprehensive suite of development tools familiar to Ethereum developers. The platform integrates with popular development frameworks, testing environments, and deployment tools. Key features include:
3444
-
3445
-
- Contract development in Solidity or Rust.
3446
-
- Support for standard Ethereum development libraries.
3447
-
- Integration with widely used development environments.
3448
-
- Access to blockchain explorers and indexing solutions.
3449
-
- Compatibility with contract monitoring and management tools.
3450
-
3451
-
### Cross-Chain Capabilities
3452
-
3453
-
Smart contracts deployed on Polkadot Hub can leverage Polkadot's [cross-consensus messaging (XCM) protocol](/parachains/interoperability/get-started/){target=\_blank} protocol to seamlessly _transfer tokens and call functions on other blockchain networks_ within the Polkadot ecosystem, all without complex bridging infrastructure or third-party solutions.
3454
-
3455
-
### Use Cases
3456
-
3457
-
Polkadot Hub's smart contract platform is suitable for a wide range of applications:
- Governance systems integrated with Polkadot's democracy mechanisms.
3462
-
- Cross-chain bridges and asset management solutions.
3442
+
Furthermore, all smart contracts in Polkadot Hub can interact with any service in the Polkadot ecosystem through [XCM](/smart-contracts/precompiles/xcm/){target=\_blank}, enabling token transfers, remote execution, and cross-chain composability without bridges or intermediaries.
3463
3443
3464
3444
## Other Smart Contract Environments
3465
3445
@@ -3469,32 +3449,41 @@ Beyond Polkadot Hub's native PolkaVM support, the ecosystem offers two main alte
3469
3449
3470
3450
- **Rust (ink!)**: ink! is a Rust-based framework that can compile to PolkaVM. It uses [`#[ink(...)]`](https://use.ink/docs/v6/macros-attributes/){target=\_blank} attribute macros to create Polkadot SDK-compatible PolkaVM bytecode, offering strong memory safety from Rust, an advanced type system, high-performance PolkaVM execution, and platform independence with sandboxed security.
3471
3451
3452
+
## Next Steps
3453
+
3454
+
<div class="grid cards" markdown>
3472
3455
3473
-
Each environment provides unique advantages based on developer preferences and application requirements.
Developers can use their existing Ethereum development tools and connect to Polkadot Hub's RPC endpoints. The platform's Ethereum compatibility layer ensures a smooth transition forteams already building on Ethereum-compatible chains.
3460
+
Quick-start guides forconnecting, deploying, and building your first smart contract.
3478
3461
3479
-
Subsequent sections of this guide provide detailed information about specific development tools, advanced features, and best practices for building on Polkadot Hub.
3462
+
[:octicons-arrow-right-24: Get Started](/smart-contracts/get-started/)
0 commit comments