zkSync RPC
What is zkSync?
zkSync Era is a zero-knowledge rollup (zkRollup) Layer 2 solution for Ethereum developed by Matter Labs. It uses SNARK-based cryptographic proofs to batch transactions off-chain and verify them on Ethereum mainnet, ensuring all transactions are mathematically valid while inheriting Ethereum's security.
Unlike optimistic rollups, zkSync does not require challenge periods for withdrawals because validity proofs provide immediate cryptographic certainty. This enables faster finality compared to optimistic rollups and significantly reduces transaction costs relative to Ethereum mainnet.
zkSync Era uses a zkEVM architecture, allowing Solidity smart contracts to be compiled into zkSync-compatible bytecode. The system was designed to eventually support zkPorter, a hybrid data-availability solution that could lower costs further by storing some data off-chain. However, zkPorter is not currently available on mainnet.
Interacting with zkSync
zkSync extends the standard Ethereum JSON-RPC interface with Layer 2–specific functionality, while maintaining broad compatibility with Ethereum tooling. Developers can use zkSync Era with common tools like MetaMask, Hardhat, Foundry, and Web3 libraries with minimal changes.
透過此 API,您可以:
- Execute standard Ethereum JSON-RPC methods (eth_call, eth_sendTransaction, eth_getBalance)
- Access zkSync-specific methods for Layer 2 operations (e.g., zks_estimateFee, zks_getMainContract)
- Query bridge operations and batch information
- 透過 WebSocket 連線訂閱即時事件
You can connect to the API by:
- Running a local zkSync Era node
- Using a hosted provider such as a Quicknode zkSync endpoint, which provides access to zkSync Era Mainnet and Sepolia testnet with high reliability, archive data, and enhanced performance
支援的網路
Quicknode provides access to the following zkSync networks:
Complete reference for developers building on zkSync with Quicknode:
快速入門
Get started with zkSync quickly. Follow our step-by-step quickstart to set up your endpoint and make your first API request.
供應商端點
Learn how to configure and manage your zkSync endpoints for optimal performance and reliability.
API 概覽
探索受支援的 API、網路、Quicknode 產品以及增強的 API 功能,以建置功能強大的應用程式。
市集
探索並整合來自 Quicknode 市集的強大外掛程式與工具,以強化您的 Web3 應用程式。
端點安全
透過身分驗證、白名單機制及最佳安全實務,確保您的端點安全。
錯誤代碼
Understand common error codes and troubleshooting steps for zkSync API requests.