Gravity Alpha – Build on Galxe's Ultra-Fast EVM Blockchain
Gravity Alpha RPC
With Dwellir, you get access to our global Gravity Alpha network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Why Build on Gravity Alpha?
Gravity Alpha is Galxe's high-performance EVM-compatible blockchain, designed as the proving ground for their upcoming Layer 1 mainnet. Built on Arbitrum Nitro stack, Gravity Alpha offers:
🚀 Ultra-High Performance
- 1 Gigagas per second - Exceptional throughput for complex applications
- Sub-second finality - Near-instant transaction confirmations
- Parallel execution - Multiple transactions processed simultaneously
🛡️ Enterprise Security
- Restaking-powered PoS - Enhanced security through protocols like EigenLayer
- Battle-tested infrastructure - Built on proven Arbitrum Nitro technology
- EVM compatibility - Full Ethereum tooling and smart contract support
🌍 Massive User Base
- 25+ million users - Access to Galxe's extensive ecosystem
- 2.6M daily transactions - High activity and engagement
- Cross-chain compatibility - Seamless omnichain interactions
Quick Start with Gravity Alpha
Connect to Gravity Alpha in seconds with Dwellir's optimized endpoints:
🔗 RPC Endpoints
https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY
Quick Connect:
curl -X POST https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Installation & Setup
- Ethers.js v6
- Web3.js
- Viem
- Web3.py
import { JsonRpcProvider } from 'ethers';
// Connect to Gravity Alpha mainnet
const provider = new JsonRpcProvider(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
);
// 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 Gravity Alpha mainnet
const web3 = new Web3(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
);
// Get chain ID to verify connection
const chainId = await web3.eth.getChainId();
console.log('Connected to Gravity Alpha:', chainId === 1625);
// Get gas price for optimal transaction pricing
const gasPrice = await web3.eth.getGasPrice();
console.log('Current gas price:', gasPrice);
import { createPublicClient, http } from 'viem';
// Define Gravity Alpha chain
const gravityAlpha = {
id: 1625,
name: 'Gravity Alpha',
network: 'gravity-alpha',
nativeCurrency: {
decimals: 18,
name: 'G',
symbol: 'G',
},
rpcUrls: {
default: {
http: ['https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'],
},
public: {
http: ['https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'],
},
},
};
// Create Gravity Alpha client
const client = createPublicClient({
chain: gravityAlpha,
transport: http(),
});
// Read contract data
const data = await client.readContract({
address: '0x...',
abi: contractAbi,
functionName: 'balanceOf',
args: ['0x...'],
});
from web3 import Web3
# Connect to Gravity Alpha mainnet
w3 = Web3(Web3.HTTPProvider(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
))
# Verify connection
print('Connected:', w3.is_connected())
# Get chain ID
chain_id = w3.eth.chain_id
print('Chain ID:', chain_id) # Should be 1625
# Get latest block
latest_block = w3.eth.block_number
print('Latest block:', latest_block)
# Get account balance
balance = w3.eth.get_balance('0x...')
print('Balance:', w3.from_wei(balance, 'ether'), 'G')
Network Information
Chain ID
1625
MainnetNative Token
G
Gas tokenRPC Standard
Ethereum
JSON-RPC 2.0Performance
1 Gigagas/s
ThroughputJSON-RPC API Reference
Gravity Alpha supports the full Ethereum JSON-RPC API specification for seamless EVM compatibility.
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 build on Galxe's ultra-fast EVM blockchain?
Get your API key →Common Integration Patterns
🔄 Transaction Monitoring
Monitor pending and confirmed transactions efficiently:
// Watch for transaction confirmation
async function waitForTransaction(txHash) {
const receipt = await provider.waitForTransaction(txHash, 1);
// Check transaction status
if (receipt.status === 1) {
console.log('Transaction successful:', receipt.transactionHash);
}
return receipt;
}
// Monitor new blocks
provider.on('block', (blockNumber) => {
console.log('New block:', blockNumber);
});
💰 Gas Optimization
Optimize gas costs on Gravity Alpha:
// Get current fee data
const feeData = await provider.getFeeData();
// Estimate gas for transaction
const gasEstimate = await provider.estimateGas(tx);
// Prepare optimized transaction
const optimizedTx = {
to: recipient,
value: amount,
gasLimit: gasEstimate,
maxFeePerGas: feeData.maxFeePerGas,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
};
🔍 Event Filtering
Efficiently query contract events:
// Query events with automatic retry and pagination
async function getEvents(contract, eventName, fromBlock = 0) {
const filter = contract.filters[eventName]();
const events = [];
const batchSize = 5000; // Gravity Alpha recommended batch size
const currentBlock = await provider.getBlockNumber();
for (let i = fromBlock; i <= currentBlock; i += batchSize) {
const batch = await contract.queryFilter(
filter,
i,
Math.min(i + batchSize - 1, currentBlock)
);
events.push(...batch);
}
return events;
}
Performance Best Practices
1. Batch Requests
Combine multiple RPC calls for optimal performance:
const batch = [
{ method: 'eth_blockNumber', params: [] },
{ method: 'eth_gasPrice', params: [] },
{ method: 'eth_getBalance', params: [address, 'latest'] }
];
const results = await provider.send(batch);
2. Connection Pooling
Reuse provider instances to minimize connection overhead:
// Singleton pattern for provider
class GravityAlphaProvider {
static instance = null;
static getInstance() {
if (!this.instance) {
this.instance = new JsonRpcProvider(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
);
}
return this.instance;
}
}
3. Smart Caching
Cache immutable data to reduce API calls:
const cache = new Map();
async function getCachedBlockData(blockNumber) {
const key = `block_${blockNumber}`;
if (!cache.has(key)) {
const block = await provider.getBlock(blockNumber);
cache.set(key, block);
}
return cache.get(key);
}
Troubleshooting Common Issues
Error: "Wrong chain ID"
Ensure you're using the correct chain ID for Gravity Alpha:
// Verify chain connection
const network = await provider.getNetwork();
console.log('Connected to chain ID:', network.chainId); // Should be 1625
// Check if connected to correct network
if (network.chainId !== 1625) {
throw new Error('Wrong network. Please connect to Gravity Alpha (1625)');
}
Error: "Transaction underpriced"
Gravity Alpha uses EIP-1559 pricing. Always use dynamic gas pricing:
// Get current fee data
const feeData = await provider.getFeeData();
const tx = {
to: recipient,
value: amount,
maxFeePerGas: feeData.maxFeePerGas,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
gasLimit: 21000n
};
Error: "Rate limit exceeded"
Implement exponential backoff for resilient applications:
async function callWithRetry(fn, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (error.code === 429 && i < maxRetries - 1) {
await new Promise(r => setTimeout(r, 2 ** i * 1000));
} else {
throw error;
}
}
}
}
FAQs
Q: What makes Gravity Alpha different from other EVM chains? A: Gravity Alpha offers 1 gigagas per second throughput with sub-second finality, built specifically as a proving ground for Galxe's upcoming Layer 1 blockchain.
Q: Is Gravity Alpha compatible with Ethereum tools? A: Yes, Gravity Alpha is fully EVM-compatible, supporting all existing Ethereum tools, libraries, and smart contracts.
Q: What is the native token of Gravity Alpha? A: The native token is G, which serves as both the gas token and governance token for the Galxe ecosystem.
Q: Does Gravity Alpha support smart contracts? A: Yes, Gravity Alpha fully supports Solidity smart contracts and all EVM features.
Smoke Tests
Test your connection to Gravity Alpha with these simple commands:
cURL Tests
# Test mainnet connectivity
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY
# Get chain ID
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY
Ethers.js v6 Tests
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
);
// Test connection and chain ID
const network = await provider.getNetwork();
console.log('Chain ID:', network.chainId); // Should be 1625n
// Test block number
const blockNumber = await provider.getBlockNumber();
console.log('Latest block:', blockNumber);
Web3.py Tests
from web3 import Web3
w3 = Web3(Web3.HTTPProvider(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
))
# Test connection
print('Connected:', w3.is_connected())
# Test chain ID
chain_id = w3.eth.chain_id
print('Chain ID:', chain_id) # Should be 1625
# Test latest block
block_number = w3.eth.block_number
print('Latest block:', block_number)
Migration Guide
From Ethereum Mainnet
Moving from Ethereum to Gravity Alpha requires minimal changes:
// Before (Ethereum)
const provider = new JsonRpcProvider('https://eth-rpc.example.com');
// After (Gravity Alpha)
const provider = new JsonRpcProvider(
'https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'
);
// ✅ Smart contracts work identically
// ✅ Same tooling and libraries
// ⚠️ Different chain ID (1625)
// ⚠️ Different native token (G)
// ⚠️ Much faster performance
From Other EVM Chains
// Update your chain configuration
const gravityAlphaConfig = {
chainId: 1625,
chainName: 'Gravity Alpha',
nativeCurrency: {
name: 'G',
symbol: 'G',
decimals: 18,
},
rpcUrls: ['https://api-gravity-alpha-mainnet.n.dwellir.com/YOUR_API_KEY'],
};
Resources & Tools
Official Resources
Developer Tools
Need Help?
- 📧 Email: support@dwellir.com
- 📚 Docs: You're here!
- 🎯 Dashboard: dashboard.dwellir.com
Start building on Gravity Alpha with Dwellir's enterprise-grade RPC infrastructure. Get your API key →