zksync

Guides zkSync Era contract deployment, native account abstraction, paymasters, and L1-L2 bridging.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill zksync-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zksync
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/zksync
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill zksync-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zksync-ethers, ethers, @matterlabs/hardhat-zksync.

What problem does it solve? Developing on zkSync Era differs significantly from standard Ethereum: contracts compile to zkEVM bytecode via zksolc, CREATE2 address derivation includes constructor input hashes, all accounts are smart accounts, gas includes L1 pubdata costs, and opcodes like SELFDESTRUCT and EXTCODECOPY behave differently. This Skill prevents costly mistakes caused by applying Ethereum assumptions to zkSync. ## Core Features & Use Cases - ZK-Specific Deployment: Deploy contracts with hardhat-zksync or foundry-zksync, including correct CREATE2 address computation and contract verification. - Native Account Abstraction & Paymasters: Implement custom IAccount smart accounts (e.g., multi-sig) and General or Approval-Based paymasters for gasless or ERC-20-paid transactions. - Bridging & System Contracts: Handle L1-L2 ETH/ERC-20 deposits, withdrawal finalization, L2-to-L1 messaging, and interaction with system contracts like ContractDeployer and NonceHolder. - Use Case: A developer porting an Ethereum dApp to zkSync uses this Skill to fix CREATE2 factory address mismatches, add a paymaster so users pay gas in USDC, and bridge test ETH via the canonical bridge. ## Quick Start Ask the agent to deploy a Solidity contract to zkSync Sepolia testnet using hardhat-zksync and verify it on the explorer.

Frequently Asked Questions about zksync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a smart contract to zkSync Era?

Compile with zksolc via hardhat-zksync or foundry-zksync, then deploy using the Deployer class or forge create with the --zksync flag. All deployments route through the ContractDeployer system contract, so raw EVM bytecode from standard solc will not work.

How do paymasters work on zkSync Era?

Paymasters implement IPaymaster with validateAndPayForPaymasterTransaction, which pays the bootloader in ETH to sponsor gas. The General flow covers all gas, while the Approval-Based flow lets users pay fees in ERC-20 tokens that the paymaster collects.

Why does my CREATE2 address differ on zkSync vs Ethereum?

zkSync CREATE2 derivation includes keccak256 of the constructor input in addition to deployer, salt, and bytecode hash. Use utils.create2Address from zksync-ethers instead of ethers.getCreate2Address to compute correct addresses.

Does zkSync Era support standard Ethereum tooling like Hardhat and Foundry?

Yes, through forks and plugins: @matterlabs/hardhat-zksync for Hardhat and foundry-zksync for Foundry. Both compile with zksolc instead of solc, and zksync-ethers replaces standard ethers providers for zkSync-specific transaction fields.

Why does extcodesize return non-zero for EOAs on zkSync?

On zkSync every account is a smart account, so EOAs carry the default account implementation bytecode. Using extcodesize to distinguish contracts from EOAs produces false positives and should be avoided.

How long do zkSync Era withdrawals to Ethereum take?

L2 confirmation takes seconds, but withdrawals require ZK proof generation and L1 verification, typically 1-3 hours. After proof verification, call finalizeWithdrawal on L1 to claim the funds.