Build on X1


Welcome to X1 developer documentation.

X1 is a zkEVM Layer 2 network built on Ethereum, powered by Polygon CDK - a zkEVM stack for building Ethereum L2 scaling solutions. Developers can easily deploy their existing contracts on zkEVM, and users can move their assets from Ethereum and conduct transactions off-chain. These transactions are bundled into groups with a zero-knowledge proof to verify their validity.

Why build on X1?#

  • Boundless scalability: enable ZK-powered DApps on X1, with 100% EVM compatibility and easy-to-use developer tools for deployment
  • Powered by OKX: seamless OKX product integrations, all-in-one Web3 gateway, and access to 50M+ users in the OKX ecosystem
  • Security: rely on robust secure mechanisms from Ethereum, with trustless interoperability
  • Low fee: same coding experience as Ethereum, with 100x less in costs
  • Portal to Web3: enter the world of Web3 via OKX Wallet, built with compact infrastructure modules to create innovative DApps
  • Powered by Polygon: zkEVM Layer 2 based on Polygon CDK, ensuring near-instant finality, unified liquidity, and independent data availability

What's the difference between building on X1 vs. Ethereum for developers?#

Building DApps on X1 is just like building them on Ethereum. All you have to do is switch to the X1 RPC and begin your development on X1, that offers faster transactions, lower costs, and robust security. X1 offers a user experience similar to the Ethereum Virtual Machine (EVM) for both developers and users. This means you won't need any new tools or wallets to create or use DApps on zkEVM.

You can visit Polygon's Differences between EVM and zkEVM for detailed differences in terms of supported EIPs, opcodes, and additional changes to build on zkEVM.

Acquiring testnet OKB#

To start building on X1, you'll first need some testnet OKB. See the Faucet guide for the steps to get testnet OKB on X1.

Connecting to X1#

You can add X1 testnet by inputting the following network info:

PropertiesNetwork details
Network nameX1 testnet
Chain ID195
Token symbolOKB
Block explorer URL

You can also simply add X1 Testnet to MetaMask through Chainlist

Mainnet network info will be updated after X1 is live on Mainnet.

The next step is to bridge your assets from Ethereum → X1. You can use the X1 Bridge to bridge your assets.

Deploying smart contracts#

Developing on X1 is seamless and identical to Ethereum Virtual Machine (EVM). Developers can use their existing code and toolings to deploy on X1 with much better performance and lower fees. Check out how to deploy smart contracts on X1:

Deploy using Hardhat
Guide to deploy contract using Hardhat
Deploy using Truffle
Guide to deploy contract using Truffle
Deploy using Foundry
Guide to deploy contract using Foundry

Developer support#

If you need help with anything related to X1, you can raise your questions on our Discord channel:

  1. Join the X1 Discord server here.
  2. Select "Yes" when asked if you are a developer.
  3. Navigate to the #dev-support channel. You can now contact X1 tech support staff with your questions and concerns. We will actively monitor for issues and work to resolve them asap.