開發者資源

ZetaChain is the first ever L1 blockchain to enable fully interoperable smart contracts, or universal smart contracts, that connect all blockchains and bring the power of programmability to non-smart contract chains like Bitcoin and Dogecoin. We provide an unparalleled combination of security, simplicity, and flexibility for developers.

專為無與倫比的開發者體驗所打造

一次部署,即可在所有區塊鏈上取用

Manage a single universal contract for all chains, instead of one contract for each supported chain. Experience the simplicity of building on Ethereum with access to assets on any chain, even non-smart contract chains like Bitcoin.

更少交易,更少費用

ZetaChain 上的複雜合約邏輯可透過簡單的轉移和單一交易來協調所有連結的外部區塊鏈資源,最大限度地降低使用者的總 gas 支出和滑點。

更安全、更良好的使用者體驗

交易邏輯在我們的智慧合約中以不可分拆式的方式發生,從而降低滑點、減少受攻擊面,並降低競爭危害的機率。體驗真正的一步式交易(及費用),即使在跨鏈操作時也是如此。

最佳 DevX = 最佳 UX

Universal Smart Contracts and Messaging give you a complete toolkit to easily build intuitive, traceable, single-step transactions so your users don’t get stuck or risk their funds.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol";
import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol";

import "../shared/SwapHelperLib.sol";

contract ZetaSwap is zContract {
    SystemContract public immutable systemContract;

    constructor(address systemContractAddress) {
        systemContract = SystemContract(systemContractAddress);
    }

    modifier onlySystem() {
        require(msg.sender == address(systemContract), "Only system contract can call this function");
        _;
    }

    function onCrossChainCall(
        zContext calldata context,
        address zrc20,
        uint256 amount,
        bytes calldata message
    ) external virtual override onlySystem {
        (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode(
            message,
            (address, bytes32, uint256)
        );
        uint256 outputAmount = SwapHelperLib._doSwap(
            systemContract.wZetaContractAddress(),
            systemContract.uniswapv2FactoryAddress(),
            systemContract.uniswapv2Router02Address(),
            zrc20,
            amount,
            targetZRC20,
            minAmountOut
        );
        SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, receipient);
    }
}

最簡易,最萬能的跨區塊鏈平台

想與 ZetaChain 區塊鏈互動,請在您的去中心化應用程式中實行 3 項功能來得出直覺、可追蹤、可復原的行為,讓您的使用者免於卡住或資金面臨風險。

開始使用連線工具 API
/**
/* Sending value and data cross-chain */
function send(ZetaInterfaces.SendInput calldata input) external;

/* onZetaMessage is called when cross-chain message reaches contract */
function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external;

/* onZetaRevert is called when cross-chain message reverts */
function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external;

Universal Primitives

ZetaChain's universal primitives give developers the ability to deploy applications once and orchestrate assets on any connected chain from a single place of logic.

Universal toolkit

Universal Smart Contracts

Leverage the existing Ethereum smart contract ecosystem and build truly interoperable apps on ZetaChain as if everything were on a single chain.

了解更多

跨區塊鏈傳訊

在任何區塊鏈間發送任意訊息並移動實際價值內容,無須打包或鎖定資源。

了解更多

Universal Accounts

ZetaChain’s novel TSS architecture lets users and contracts custody and manage assets from a single place, in a secure and decentralized manner.

即將推出

探查工具

可完整探查的交易:查看及監控 ZetaChain 內部交易及任何區塊鏈間所發生的交易。

前往探查工具

ZetaChain 比起來如何?

As a blockchain and smart contract platform, ZetaChain provides a fully public, transparent, decentralized interoperability solution that supports both universal messaging and smart contracts. Developers on ZetaChain only need to implement their dApp logic, while ZetaChain handles the transaction of data and value across chains in a trust-minimized way.

閱讀白皮書
ZetaChainCosmosPolkadotTHORChainBridges/Messaging通用智慧合約
跨鏈價值轉移
跨鏈傳訊
與鏈無關
僅 Cosmos/IBC 鏈
特定應用程式的區塊鏈配對
結帳
即時原生結帳
打包
打包
即時原生結帳
打包,履行風險
原生比特幣保險庫管理
特定應用程式
Universal Smart Contracts
僅 Cosmos/IBC 鏈
僅平行鏈

降低風險

ZetaChain 是採用 TSS 和 Pos Tendermint 共識所建構的去中心化網路,可受攻擊面極小。

統一流動性

無打包資源、中心化橋接或越來越多的互賴性風險。更高的自由度和更經濟的交易。

無限的相容性

ZetaChain 可支援任何現存或新的區塊鏈,甚至包括比特幣和狗狗幣等非智慧合約型區塊鏈。

開始建構

運用我們不斷擴增的範例庫以及真實使用案例的真實合約來啟動您的開發工作。

Deploy an Universal dApp
Universal lending
任意鏈間支付
Universal NFTs
跨鏈所有權證明
狗狗幣智慧合約
跨鏈 DEX
Universal DAOs
跨鏈 stableswap
Universal lending
任意鏈間支付
Universal NFTs
跨鏈所有權證明
狗狗幣智慧合約
跨鏈 DEX
Universal DAOs
跨鏈 stableswap

想進行合作嗎?

Share ideas and find collaborators to build universal dApps on ZetaChain in our Discord Development Zone. Our team is always ready to help out.

最新

查看最新的 ZetaChain 消息

Placeholder

bitSmiley launches the first native BTC-backed stablecoin on ZetaChain, accessible on all chains

bitSmiley launches the first native BTC-backed stablecoin, bitUSD, on ZetaChain testnet, unlocking seamless cross-chain DeFi with native Bitcoin.

Placeholder

August 2024: 16 improvements to the Universal Blockchain!

At ZetaChain, our mission is to power Universal Apps that span all chains from native Bitcoin and Ethereum to Cosmos, Solana and beyond. August brought us 16 steps closer towards realizing this goal. From universal memes and major global events to unlocking native BTC in web3 — let’s dive into the highlights!

Placeholder

Animoca Brands secures the first Universal Blockchain

At ZetaChain, our mission is to power Universal Apps that span all chains from native Bitcoin and Ethereum to Cosmos, Solana and beyond. Today, we’re excited to announce Animoca Brands, the company advancing digital property rights for gaming and the open metaverse, pledges to secure the universal blockchain.

Placeholder

July 2024: 22 big improvements to the universal blockchain!

At ZetaChain, our mission is to power Universal Apps that span all chains from native Bitcoin and Ethereum to Cosmos, Solana and beyond. In July, we took 22 additional steps towards realizing this goal!

Placeholder

8.4M active wallets on Polygon can now access Universal Apps on ZetaChain

At ZetaChain, our mission is to power Universal Apps that span all chains from native Bitcoin and Ethereum to Cosmos, Solana and beyond.

Placeholder

Introducing ZetaAI: AI-powered interfaces and agents for universal chain abstraction

Just as ZetaChain abstracts away blockchains, ZetaAI simplifies the experience of actually using crypto. Our first iteration of ZetaAI is live in ZetaDocs!

Placeholder

Tenderly now supports Universal App building on ZetaChain

Leading full-stack infra provider Tenderly partners with ZetaChain to support the first universal blockchain. Tune into ZetaRadio today at 4pm UTC to learn more.


有問題嗎?
請見常見問答或與專家對談。