Logo

What is Abstract RPC and how do you connect to the Abstract network?

Key Takeaways

  • Abstract is a ZK rollup L2 on Ethereum, built with zkSync's ZK Stack, focused on consumer applications.
  • Abstract mainnet uses Chain ID 2741; testnet uses Chain ID 11124.
  • The official public RPC endpoints are https://api.mainnet.abs.xyz and https://api.testnet.abs.xyz.
  • Abstract RPC supports standard Ethereum JSON-RPC methods plus zkSync-specific APIs.
  • For production, consider a dedicated node provider to ensure reliability and low latency.
  • OnFinality offers public and private RPC endpoints for Abstract mainnet and testnet.
  • Always use secure connections (HTTPS/WSS) and monitor rate limits when building on Abstract.

What is Abstract?

Abstract is a zero-knowledge rollup Layer 2 blockchain built on zkSync's ZK Stack technology. It is designed specifically for consumer crypto applications and onchain culture, created by the team behind Pudgy Penguins. Abstract focuses on bringing mainstream users to Web3 through intuitive user experiences and consumer-focused applications.

Abstract combines the security of Ethereum with lower costs and faster transaction speeds, while offering native account abstraction through the Abstract Global Wallet (AGW). This enables users to interact with applications using familiar login methods like email and social accounts rather than traditional seed phrases.

As an EVM-compatible chain, Abstract supports Solidity and Vyper smart contracts, and exposes a JSON-RPC interface that is fully compatible with Ethereum's API while adding L2-specific functionality.

  • Layer 2 ZK rollup on Ethereum
  • Built on zkSync ZK Stack
  • Consumer-focused with native account abstraction
  • EVM-compatible (Solidity/Vyper)
  • Chain ID: 2741 (mainnet), 11124 (testnet)

Abstract Network Details

To connect to Abstract, you need the correct network parameters. Below are the official details for both mainnet and testnet.

CriterionWhat to checkWhy it matters
Network NameAbstract Mainnet / Abstract TestnetIdentifies the network in wallets and dApps.
Chain ID2741 (mainnet) / 11124 (testnet)Used to prevent cross-chain replay attacks.
RPC URL (HTTP)https://api.mainnet.abs.xyz / https://api.testnet.abs.xyzPrimary endpoint for JSON-RPC calls.
RPC URL (WebSocket)wss://api.mainnet.abs.xyz/ws / wss://api.testnet.abs.xyz/wsFor real-time subscriptions and event listening.
Explorerhttps://abscan.org / https://sepolia.abscan.orgBlock explorer for transaction and contract verification.
Currency SymbolETHNative token for gas fees.

How to Connect to Abstract RPC

You can connect to Abstract using any standard Ethereum-compatible wallet or library. Here are common methods:

  • Add network manually in MetaMask: Network Name: Abstract Mainnet, RPC URL: https://api.mainnet.abs.xyz, Chain ID: 2741, Currency Symbol: ETH.
  • Use ChainList (chainlist.org) to add Abstract automatically by connecting your wallet.
  • In your dApp, configure ethers.js or web3.js with the Abstract RPC URL.
  • For production, use a managed RPC provider like OnFinality for better reliability and scalability.

Choosing an RPC Provider for Abstract

While the public RPC endpoints are suitable for development and light usage, production applications require a robust RPC provider to ensure uptime, low latency, and rate limit management. When evaluating providers, consider:

  • Global endpoint distribution for low-latency access.
  • Support for archive data if you need historical state.
  • WebSocket support for real-time features.
  • Rate limits and pricing that match your traffic.
  • Dedicated node options for high-throughput or latency-sensitive apps.
CriterionWhat to checkWhy it matters
Public RPCRate limits, uptime, no supportSuitable for testing, not production.
Managed ProviderSLAs, global nodes, archive supportReliable for production with scaling.
Dedicated NodeFull control, no rate limits, custom configBest for high-traffic or specialized needs.

Abstract RPC API Methods

Abstract nodes expose the standard Ethereum JSON-RPC API, plus additional methods for zkSync features. You can use all common eth_* methods such as eth_blockNumber, eth_call, eth_sendRawTransaction, and eth_getLogs. Additionally, Abstract supports zkSync-specific methods for managing account abstraction and L2 transactions.

For a full list of supported methods, refer to the official Abstract documentation or your provider's API reference.

Best Practices for Using Abstract RPC

To ensure a smooth experience when building on Abstract, follow these best practices:

  • Always use HTTPS/WSS to encrypt communication.
  • Implement retry logic with exponential backoff for failed requests.
  • Monitor your usage to avoid hitting rate limits.
  • Use WebSocket for real-time data instead of polling.
  • Test on testnet (Sepolia) before deploying to mainnet.
  • Consider using a dedicated node if your application requires consistent performance.

Troubleshooting Common Issues

If you encounter problems connecting to Abstract RPC, check the following:

  • Verify the Chain ID is correct (2741 for mainnet, 11124 for testnet).
  • Ensure your RPC URL is reachable and not blocked by a firewall.
  • Check that your wallet or dApp is using the correct network.
  • If using a public endpoint, you may hit rate limits; switch to a provider with higher limits.
  • For WebSocket connections, confirm the URL ends with /ws.

Frequently Asked Questions

What is Abstract RPC?

Abstract RPC is the Remote Procedure Call interface for the Abstract blockchain, a ZK rollup L2 on Ethereum. It allows wallets, dApps, and other clients to interact with the network by sending JSON-RPC requests.

What is the Abstract mainnet RPC URL?

The official public RPC URL for Abstract mainnet is https://api.mainnet.abs.xyz. WebSocket endpoint: wss://api.mainnet.abs.xyz/ws.

What is the Abstract testnet RPC URL?

The official public RPC URL for Abstract testnet is https://api.testnet.abs.xyz. WebSocket endpoint: wss://api.testnet.abs.xyz/ws.

What Chain ID does Abstract use?

Abstract mainnet uses Chain ID 2741 (0xab5). The testnet uses Chain ID 11124.

Is Abstract EVM-compatible?

Yes, Abstract is fully EVM-compatible, supporting Solidity and Vyper smart contracts and standard Ethereum JSON-RPC methods.

Can I use OnFinality for Abstract RPC?

Yes, OnFinality provides public and dedicated RPC endpoints for Abstract mainnet and testnet. Visit the Abstract network page for details.

abstract rpc
RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started