Frequently asked questions about the zkSync Era API
What is zkSync?
zkSync is a Zero Knowledge (ZK) rollup designed for EVM compatibility within the Ethereum blockchain. It enables developers who have built EVM-based dApps to effortlessly transition to zkSync, enjoying significantly reduced gas fees and increased transactions per second, all while inheriting Ethereum's renowned security and decentralization features.
Why choose zkSync Era?
zkSync Era represents a significant advancement in Layer 2 solutions:
- EVM Compatibility: It supports generalized EVM smart contracts, making it incredibly easy for existing dApps to migrate to zkSync Era.
- Aligned with Decentralization: Commitment to open-source and decentralization, with a roadmap towards fully decentralizing sequencer and proof generation.
- Certainty of Security: Utilizes zero-knowledge proofs to ensure the security of transactions.
- Future Proof: Adopting zkSync Era means your project will automatically benefit from future advancements without needing to alter your code.
What is the zkEVM?
zkEVM is the name of the architecture that enables zero-knowledge proof generation for the execution trace of smart contracts originally written for EVM. It encompasses a zkVM (a RISC-like virtual machine optimized for ZKP), a compiler based on LLVM (including Solidity and Vyper frontends), and special-purpose circuits for intensive operations. This architecture ensures compatibility while introducing significant improvements over the EVM.
How does zkSync Era improve upon EVM?
While maintaining maximum compatibility with EVM, zkSync Era introduces notable enhancements:
- Efficiency and Optimization: Thanks to the LLVM-based compiler, zkSync Era can significantly optimize execution and allow integration of code written in modern programming languages.
- Account Abstraction: Implemented natively, improving UX for multisig wallets, enabling transactions fees in any token, and much more.
What distinguishes zkSync Era from Optimistic Rollups?
Unlike Optimistic Rollups, which rely on game theory for security and have a fixed settlement time, zkSync Era offers immediate certainty through mathematical proofs, significantly shorter settlement times, and scalability beyond current limitations.
What is the zkSync Era API?
The zkSync Era API allows applications to connect to a zkSync Era node that is part of the zkSync Era network. Developers can interact with on-chain data and send different types of transactions to the network by utilizing the endpoints provided by the API. The API follows a JSON-RPC standard. JSON-RPC is a stateless, lightweight, remote procedure call (RPC) protocol encoded in JSON.
How can I get started using the zkSync Era API?
Explained in the zkSync Era API Quickstart Guide.
What is a zkSync Era API key?
When accessing the zkSync Era network via a node provider like Alchemy, zkSync Era developers use an API key to send and receive transactions from the network.
For the best development experience, we recommend that you sign up for a free API key!
Which wallets are supported by zkSync Era?
zkSync Era supports all Ethereum-based wallets like Metamask, BitKeep, TrustWallet, and Zerion, among others. You can manually add the zkSync Era network to Metamask by following specific instructions.
What does zkSync Era use for gas?
zkSync Era uses ETH for transaction fees and gas costs within the network. However, since zkSync Era operates as a Layer 2 solution over Ethereum, users must first bridge their ETH from the Ethereum mainnet to the zkSync Era network. This bridging process is necessary to enable the use of ETH on zkSync Era for transactions, including paying gas fees. Once bridged, the ETH in your zkSync Era account can be used seamlessly, just as on the Ethereum mainnet, but with the benefits of lower fees and faster processing times.
What testnet should I use for zkSync Era?
The testnet you should use for zkSync Era is the zkSync Era Sepolia testnet. By connecting to this testnet, you can launch smart contracts, execute transactions, and test applications on the zkSync Era network.
What methods does Alchemy support for the zkSync Era API?
You can find the list of all the methods Alchemy support for the zkSync Era API on the zkSync Era API Endpoints page.
How do I request funds for the testnet?
For testnet funds, you can use the Alchemy Sepolia facuet to claim SepoliaETH, which you can bridge to zkSync Era testnet using the TxSync bridge
Transaction times and visibility on zkSync Era?
Transactions on zkSync Era typically complete within 5 minutes. You can view all transaction details on the zkSyn Block Explorer.
What are the smart contract storage and block gas limits on zkSync Era?
The current storage limit for smart contracts is set, and the block gas limit is roughly 2^32 gas. These values are subject to change as zkSync Era continues to evolve.
Can I withdraw funds back to Ethereum?
Yes, withdrawals back to Ethereum are supported through a two-way bridge, typically taking around 24 hours depending on network usage.
What is a testnet regenesis?
A testnet regenesis in zkSync Era refers to a restart of the blockchain to introduce upgrades and return to the initial state.
Why might contracts not compile in Windows?
For Windows users, it's recommended to use WSL 2 and ensure that projects are located in the Linux filesystem for optimal performance.
My question isn't here, where can I get help?
Don't worry, we got you. Check out our discord and feel free to post any questions you have!