ZetaChain - Omnichain Smart Contract Platform
Access ZetaChain's omnichain smart contract platform through Dwellir's high-performance RPC endpoints. Build cross-chain dApps with seamless interoperability.
ZetaChain RPC
With Dwellir, you get access to our global ZetaChain network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Get your API keyWhat is ZetaChain?
ZetaChain is the foundational layer for universal blockchain interoperability, enabling omnichain smart contracts and messaging between any blockchain. As a Proof-of-Stake blockchain built on Cosmos SDK and Tendermint consensus, ZetaChain connects all blockchains, including Bitcoin, Ethereum, and other chains without smart contracts.
Key Features
- ** Universal Connectivity** - Connect to any blockchain, including Bitcoin and non-smart contract chains
- ** Omnichain Smart Contracts** - Deploy contracts that can read and write to multiple chains
- ** Native Cross-Chain Swaps** - Swap assets across chains without wrapped tokens
- ** Decentralized Security** - Secured by a decentralized network of validators
- ** High Performance** - Fast finality with 6-second block times
- ** EVM Compatible** - Full Ethereum compatibility for easy dApp migration
Why Choose ZetaChain?
For Cross-Chain Developers
ZetaChain revolutionizes cross-chain development with its unique omnichain smart contract capability:
- Single Contract, Multiple Chains - Write once, interact with all chains
- Native Asset Support - Handle native tokens without wrapping
- Simplified Architecture - No bridges or wrapped tokens needed
- Universal Messaging - Send messages and data between any chains
For DeFi Builders
Build truly interoperable DeFi applications:
- Cross-Chain Liquidity - Access liquidity from multiple chains
- Omnichain DEXs - Trade assets across chains seamlessly
- Multi-Chain Yield - Optimize yields across different blockchains
- Universal Wallets - One address for all chains
For NFT Projects
Create omnichain NFT experiences:
- Cross-Chain NFTs - NFTs that exist across multiple chains
- Multi-Chain Marketplaces - Buy and sell NFTs from any chain
- Interoperable Gaming - Game assets usable across different chains
Quick Start with ZetaChain
Connect to ZetaChain in seconds with Dwellir's optimized endpoints:
curl -sS -X POST https://api-zetachain-mainnet.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots> \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'import { JsonRpcProvider } from 'ethers';const provider = new JsonRpcProvider( 'https://api-zetachain-mainnet.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>');const latest = await provider.getBlockNumber();console.log('block', latest);import requestsurl = 'https://api-zetachain-mainnet.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>'payload = { 'jsonrpc': '2.0', 'id': 1, 'method': 'eth_blockNumber', 'params': []}resp = requests.post(url, json=payload)print(resp.json())package mainimport ( "bytes" "fmt" "io" "net/http")func main() { url := "https://api-zetachain-mainnet.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>" payload := []byte(`{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}`) resp, err := http.Post(url, "application/json", bytes.NewBuffer(payload)) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))}Network Information
| Parameter | Value | Details |
|---|---|---|
| Chain ID | 7000 (0x1b58) | |
| Native Token | ZETA | |
| Block Time | 6 seconds | |
| Consensus | Tendermint BFT |
Installation & Setup
import { JsonRpcProvider } from 'ethers';
// Connect to ZetaChain mainnet
const provider = new JsonRpcProvider(
'https://api-zetachain-mainnet.n.dwellir.com/YOUR_API_KEY'
);
// Verify connection to ZetaChain (Chain ID: 7000)
const network = await provider.getNetwork();
console.log('Connected to ZetaChain:', network.chainId === 7000n);
// Get the latest block
const block = await provider.getBlock('latest');
console.log('Latest block:', block.number);
// Query ZETA balance
const balance = await provider.getBalance('0x...');
console.log('ZETA Balance:', balance.toString());API Reference
Omnichain Smart Contracts
ZetaChain's unique omnichain smart contracts can interact with multiple blockchains:
// Example: Omnichain DEX Contract
pragma solidity 0.8.7;
import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol";
import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol";
contract OmnichainDEX {
SystemContract public systemContract;
constructor(address systemContractAddress) {
systemContract = SystemContract(systemContractAddress);
}
// Swap tokens across any chain
function crossChainSwap(
address zrc20From,
address zrc20To,
uint256 amount,
bytes calldata recipient
) external {
// Transfer from user
IZRC20(zrc20From).transferFrom(msg.sender, address(this), amount);
// Perform swap logic
uint256 amountOut = calculateSwapAmount(zrc20From, zrc20To, amount);
// Send to recipient on destination chain
IZRC20(zrc20To).withdraw(recipient, amountOut);
}
}Cross-Chain Messaging
Send messages between any blockchains:
// Send cross-chain message from Ethereum to Bitcoin
const connector = new ethers.Contract(connectorAddress, connectorABI, signer);
const tx = await connector.send({
destinationChainId: "18332", // Bitcoin testnet
destinationAddress: bitcoinAddress,
destinationGasLimit: 100000,
message: ethers.utils.defaultAbiCoder.encode(
["string"],
["Hello from Ethereum!"]
),
zetaValueAndGas: ethers.utils.parseEther("0.1"),
zetaParams: "0x"
});
console.log('Cross-chain message sent:', tx.hash);Available Methods
ZetaChain supports all standard Ethereum JSON-RPC methods:
Core Methods
- eth_blockNumber - Get the latest block number
- eth_call - Execute a smart contract call
- eth_chainId - Get the chain ID (7000)
- eth_getBalance - Query account balance
Transaction Methods
- eth_sendRawTransaction - Send signed transactions
- eth_getTransactionByHash - Get transaction details
- eth_getTransactionReceipt - Get transaction receipt
- eth_estimateGas - Estimate gas for transactions
Block Methods
- eth_getBlockByNumber - Get block by number
- eth_getBlockByHash - Get block by hash
Smart Contract Methods
- eth_getCode - Get contract bytecode
- eth_getStorageAt - Read contract storage
Event Methods
- eth_getLogs - Query event logs
eth_newFilter- Create event filter (documentation coming soon)
Rate Limits & Performance
Endpoint Performance
- Throughput: 10,000+ requests/second
- Latency: < 50ms average response time
- Uptime: 99.95% SLA guarantee
- Geographic Distribution: Global edge locations
Rate Limiting Tiers
| Tier | Requests/Second | Monthly Requests | Support |
|---|---|---|---|
| Free | 25 | 1M | Community |
| Developer | 100 | 10M | |
| Professional | 500 | 100M | Priority |
| Enterprise | Custom | Unlimited | 24/7 Dedicated |
Developer Resources
Official Documentation
- ZetaChain Docs - Official documentation
- GitHub - Source code and examples
- Explorer - Block explorer
SDK & Tools
- @zetachain/toolkit - JavaScript SDK
- @zetachain/protocol-contracts - Smart contract interfaces
- Hardhat Template - Starter template
Community & Support
Best Practices
1. Connection Management
// Implement retry logic for resilience
async function createProvider() {
const provider = new ethers.JsonRpcProvider(
'https://api-zetachain-mainnet.n.dwellir.com/YOUR_API_KEY'
);
// Set custom timeout
provider._getConnection().timeout = 10000;
// Verify connection
try {
await provider.getNetwork();
return provider;
} catch (error) {
console.error('Connection failed, retrying...');
await new Promise(r => setTimeout(r, 1000));
return createProvider();
}
}2. Gas Optimization
// Optimize gas for cross-chain transactions
async function estimateCrossChainGas(contract, method, params) {
// Get current gas price
const gasPrice = await provider.getGasPrice();
// Estimate gas with buffer for cross-chain
const estimatedGas = await contract.estimateGas[method](...params);
const gasLimit = estimatedGas.mul(120).div(100); // 20% buffer
return {
gasLimit,
gasPrice: gasPrice.mul(110).div(100) // 10% above current
};
}3. Event Monitoring
// Monitor cross-chain events efficiently
function watchCrossChainEvents(contract) {
const filter = contract.filters.CrossChainCall();
contract.on(filter, (from, to, amount, destinationChain, event) => {
console.log(`Cross-chain transfer: ${from} → ${to}`);
console.log(`Amount: ${amount}, Chain: ${destinationChain}`);
console.log(`Transaction: ${event.transactionHash}`);
});
}Security Considerations
Cross-Chain Security
- Always validate destination addresses
- Implement proper access controls
- Use time locks for large transfers
- Monitor cross-chain message status
Smart Contract Best Practices
// Secure cross-chain transfer
modifier validateCrossChain(uint256 chainId) {
require(
systemContract.isValidChainId(chainId),
"Invalid destination chain"
);
_;
}
function secureCrossChainTransfer(
uint256 destinationChainId,
bytes calldata recipient,
uint256 amount
) external validateCrossChain(destinationChainId) {
// Implementation
}Need Help?
Email: support@dwellir.com Discord: Join our community More Docs: dwellir.com/docs
Start building omnichain dApps with ZetaChain today!
rpc_methods
List all available RPC methods on XX Network. Essential for API discovery, capability detection, and building dynamic tooling for Substrate-based chains.
eth_blockNumber
Get the current block height on Zetachain. Essential for syncing dApps, monitoring transaction confirmations, and blockchain state tracking.

