Zora L2 - The Creator Economy & NFT Chain
Chain RPC
With Dwellir, you get access to our global Chain network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Why Build on Zora?
Zora is the leading Ethereum Layer 2 optimized for creators, NFTs, and onchain media. Built on Optimism's OP Stack, Zora offers the perfect infrastructure for the creator economy:
🎨 Creator-First Design
- 0.000777 ETH mint rewards - Get rewarded for onchain activity
- Gas-optimized NFT operations - Efficient minting, trading, and transfers
- Built-in creator tools - Native support for royalties and revenue sharing
⚡ Lightning Fast & Affordable
- 2-second block times - Near-instant NFT transactions
- Ultra-low fees - Mint NFTs for pennies, not dollars
- EIP-4844 enabled - Leveraging blob data for maximum cost efficiency
🛡️ Battle-Tested Infrastructure
- OP Stack security - Inherits Ethereum's security guarantees
- 7777777 Chain ID - Lucky sevens for the creator economy
- Ethereum compatibility - Use existing tools and wallets
🌍 Thriving NFT Ecosystem
- Zora Protocol integration - Native NFT marketplace functionality
- Creator rewards system - Earn from every mint and interaction
- Major creator adoptions - Home to top artists and projects
Quick Start with Zora
Connect to Zora's creator-optimized infrastructure in seconds:
🔗 RPC Endpoints
https://api-zora-mainnet.n.dwellir.com/2307f636-d01d-4f85-ba5e-514ff37069f5
Quick Connect:
curl -X POST https://api-zora-mainnet.n.dwellir.com/2307f636-d01d-4f85-ba5e-514ff37069f5 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Installation & Setup
- Ethers.js v6
- Web3.js
- Viem
import { JsonRpcProvider } from 'ethers';
// Connect to Zora mainnet
const provider = new JsonRpcProvider(
'https://api-zora-mainnet.n.dwellir.com/2307f636-d01d-4f85-ba5e-514ff37069f5'
);
// Get the latest block
const block = await provider.getBlock('latest');
console.log('Latest block:', block.number);
// Query account balance
const balance = await provider.getBalance('0x...');
console.log('Balance:', balance.toString());
const Web3 = require('web3');
// Connect to Zora mainnet
const web3 = new Web3(
'https://api-zora-mainnet.n.dwellir.com/2307f636-d01d-4f85-ba5e-514ff37069f5'
);
// Get chain ID to verify connection
const chainId = await web3.eth.getChainId();
console.log('Connected to Zora:', chainId === 7777777n);
// Get gas price for optimal NFT transactions
const gasPrice = await web3.eth.getGasPrice();
console.log('Current gas price:', gasPrice);
import { createPublicClient, http } from 'viem';
import { zora } from 'viem/chains';
// Create Zora client
const client = createPublicClient({
chain: zora,
transport: http('https://api-zora-mainnet.n.dwellir.com/2307f636-d01d-4f85-ba5e-514ff37069f5'),
});
// Read NFT contract data
const data = await client.readContract({
address: '0x...',
abi: erc721Abi,
functionName: 'tokenURI',
args: [1],
});
Network Information
Chain ID
7777777
MainnetBlock Time
2 seconds
AverageGas Token
ETH
Native tokenRPC Standard
Ethereum
JSON-RPC 2.0JSON-RPC API Reference
Zora supports the full Ethereum JSON-RPC API specification plus OP Stack L2 optimizations for creator applications.
Available JSON-RPC Methods
📊 Reading Blockchain Data
Query blocks, transactions, and account states
📤 Sending Transactions
Submit and manage transactions
📝 Smart Contract Interaction
Call and interact with smart contracts
🔧 Node & Network Info
Query node status and network information
Ready to integrate Base into your dApp?
Get Your Free API Key →Creator-Focused Integration Patterns
🎨 NFT Minting & Management
Efficiently mint and manage NFTs on Zora:
// Mint NFT with creator rewards
async function mintNFTWithRewards(contract, to, tokenURI) {
const tx = {
to: contract.address,
data: contract.interface.encodeFunctionData('mint', [to, tokenURI]),
// Zora rewards: 0.000777 ETH per mint
value: parseEther('0.000777')
};
const receipt = await provider.sendTransaction(tx);
// Check for creator reward distribution
const rewardEvents = receipt.logs.filter(log =>
log.topics[0] === creatorRewardEventSignature
);
return { receipt, rewards: rewardEvents };
}
🔄 Real-time NFT Tracking
Monitor NFT transfers and marketplace activity:
// Watch for NFT transfers in real-time
const nftFilter = {
address: contractAddress,
topics: [
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', // Transfer
null, // from (any)
null // to (any)
]
};
provider.on(nftFilter, (log) => {
const transfer = parseLog(log);
console.log(`NFT ${transfer.tokenId} transferred from ${transfer.from} to ${transfer.to}`);
});
💰 Creator Revenue Optimization
Track and optimize creator earnings:
// Calculate total creator rewards
async function getCreatorEarnings(creatorAddress, fromBlock = 0) {
const rewardFilter = {
address: ZORA_REWARDS_CONTRACT,
topics: [
'0x...', // RewardPaid event signature
ethers.utils.hexZeroPad(creatorAddress, 32)
]
};
const logs = await provider.getLogs({
...rewardFilter,
fromBlock,
toBlock: 'latest'
});
const totalRewards = logs.reduce((sum, log) => {
const reward = parseLog(log);
return sum.add(reward.amount);
}, BigNumber.from(0));
return totalRewards;
}
🔍 Advanced NFT Querying
Query NFT metadata and ownership efficiently:
// Batch query NFT metadata
async function getNFTBatch(contractAddress, tokenIds) {
const contract = new Contract(contractAddress, erc721Abi, provider);
const batchSize = 50; // Zora recommended batch size
const results = [];
for (let i = 0; i < tokenIds.length; i += batchSize) {
const batch = tokenIds.slice(i, i + batchSize);
const promises = batch.map(async (tokenId) => ({
tokenId,
owner: await contract.ownerOf(tokenId),
tokenURI: await contract.tokenURI(tokenId),
}));
const batchResults = await Promise.all(promises);
results.push(...batchResults);
}
return results;
}
Performance Best Practices for Creators
1. Optimize NFT Operations
Use efficient patterns for high-volume NFT operations:
// Batch mint for gas efficiency
async function batchMintNFTs(contract, recipients, tokenURIs) {
const batchData = recipients.map((to, i) =>
contract.interface.encodeFunctionData('mint', [to, tokenURIs[i]])
);
const multicallData = contract.interface.encodeFunctionData('multicall', [batchData]);
return await contract.multicall(batchData, {
value: parseEther((0.000777 * recipients.length).toString())
});
}
2. Smart Caching for Metadata
Cache NFT metadata to improve user experience:
const metadataCache = new Map();
async function getCachedMetadata(tokenURI) {
if (!metadataCache.has(tokenURI)) {
const response = await fetch(tokenURI);
const metadata = await response.json();
metadataCache.set(tokenURI, metadata);
}
return metadataCache.get(tokenURI);
}
3. Event-Driven Architecture
Build responsive creator tools with event listeners:
// Listen for all creator-relevant events
const eventFilters = [
{ topics: [transferEventSignature] }, // NFT transfers
{ topics: [mintEventSignature] }, // New mints
{ topics: [saleEventSignature] }, // Marketplace sales
{ topics: [rewardEventSignature] } // Creator rewards
];
eventFilters.forEach(filter => {
provider.on(filter, handleCreatorEvent);
});
function handleCreatorEvent(log) {
const eventType = identifyEventType(log);
switch(eventType) {
case 'TRANSFER':
updateOwnershipRecords(log);
break;
case 'MINT':
trackNewCreation(log);
break;
case 'SALE':
updateCreatorEarnings(log);
break;
case 'REWARD':
distributeMintRewards(log);
break;
}
}
Troubleshooting Creator Applications
Error: "Insufficient mint reward"
Zora requires 0.000777 ETH for creator rewards on mints:
// Always include mint reward in NFT transactions
const mintTx = {
to: nftContract.address,
data: mintData,
value: parseEther('0.000777'), // Required for Zora rewards
gasLimit: 100000n
};
Error: "Token does not exist"
Handle NFT queries gracefully for better UX:
async function safeGetTokenURI(contract, tokenId) {
try {
return await contract.tokenURI(tokenId);
} catch (error) {
if (error.reason === 'ERC721: invalid token ID') {
return null; // Token doesn't exist yet
}
throw error; // Re-throw other errors
}
}
Error: "Rate limit exceeded"
Implement retry logic for high-volume creator applications:
async function mintWithRetry(contract, params, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await contract.mint(...params);
} catch (error) {
if (error.code === 429 && i < maxRetries - 1) {
const delay = Math.min(2 ** i * 1000, 10000); // Cap at 10s
await new Promise(r => setTimeout(r, delay));
} else {
throw error;
}
}
}
}
Migration Guide
From Ethereum Mainnet
Moving NFT projects from L1 to Zora L2:
// Before (Ethereum L1)
const provider = new JsonRpcProvider('https://eth-rpc.example.com');
// After (Zora L2)
const provider = new JsonRpcProvider(
'https://api-zora-mainnet.n.dwellir.com/2307f636-d01d-4f85-ba5e-514ff37069f5'
);
// ✅ Same NFT standards (ERC-721, ERC-1155)
// ✅ Same tooling and libraries work
// ✅ Dramatically lower fees
// ⚠️ Different chain ID (7777777)
// ⚠️ Creator rewards system (0.000777 ETH)
// ⚠️ L1 data fees apply
From Polygon
Zora offers better creator economics than Polygon:
// Enhanced creator benefits on Zora:
// - Built-in mint rewards (0.000777 ETH per mint)
// - Lower gas fees than Polygon
// - Native creator tools and royalty enforcement
// - Better Ethereum ecosystem integration
Creator Tools & Resources
Official Resources
Creator Tools
- Zora Create - Easy NFT minting
- Zora API - Metadata and marketplace APIs
- Creator Toolkit - Smart contract templates
Developer Resources
Need Help?
- 📧 Email: support@dwellir.com
- 📚 Docs: You're here!
- 🎯 Dashboard: dashboard.dwellir.com
Start building the future of the creator economy on Zora with Dwellir's enterprise-grade RPC infrastructure. Get your free API key →