# Plasma RPC with Dwellir

## Plasma RPC plans and rate limits

- **Free plan:** 20 responses per second, up to 100,000 responses a day.
- **Plans:** $49/mo, $299/mo, $999/mo with 25M, 150M, and 500M included responses. Overages billed at $5/$3/$2 per million responses respectively.
- **Paid rate limits:** 100 to 5,000 responses per second (bursts from 500 to 10,000), no daily limit.
- **Billing:** 1 response = 1 API credit on every shared plan, over HTTPS or WebSocket (WSS) where Plasma supports it.

Details: [Pricing](https://www.dwellir.com/docs/getting-started/pricing) · [Rate limits](https://www.dwellir.com/docs/getting-started/rate-limits) · [Authentication](https://www.dwellir.com/docs/getting-started/authentication) · [Archive nodes](https://www.dwellir.com/docs/getting-started/archive-nodes)

## Why build on Plasma?

Plasma is an EVM Layer 1 for stablecoin payments. It runs PlasmaBFT consensus and a Reth execution client. Block time is 1 second. You pay gas in XPL.

Existing Solidity contracts deploy without changes. Hardhat, Foundry, ethers.js, viem, and MetaMask work as they do on Ethereum. Payment apps and wallets use Plasma for 1 second confirmation and standard Ethereum JSON-RPC.

### **Stablecoin payments**

- **1 second blocks** - confirmation times that fit checkout and payout flows
- **XPL gas** - EIP-1559 fees paid in the native token
- **EVM contracts** - keep the Solidity you already ship

### **Standard Ethereum tooling**

- **JSON-RPC** - the same methods you use on Ethereum
- **Debug and txpool** - Dwellir exposes `debug_*` and `txpool_*` on this endpoint
- **HTTPS and WebSocket** - including `eth_subscribe` for newHeads

### **Network facts**

- **Chain ID 9745** - Plasma Mainnet Beta
- **Explorer** - [Plasmascan](https://plasmascan.to/)
- **Full nodes** - Dwellir does not advertise archive state

## Quick start with Plasma

Connect to Plasma Mainnet Beta with Dwellir:

### Installation and setup

Ethers.js v6
Web3.js
Viem
Web3.py

```javascript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider(
  'https://api-plasma-mainnet.n.dwellir.com/YOUR_API_KEY'
);

const chainId = await provider.send('eth_chainId', []);
console.log('Plasma chain ID:', parseInt(chainId, 16));

const block = await provider.getBlock('latest');
console.log('Latest block:', block.number);
```

```javascript
const { Web3 } = require('web3');

const web3 = new Web3(
  'https://api-plasma-mainnet.n.dwellir.com/YOUR_API_KEY'
);

const chainId = await web3.eth.getChainId();
console.log('Connected to Plasma:', chainId === 9745n);

const gasPrice = await web3.eth.getGasPrice();
console.log('Gas price:', web3.utils.fromWei(gasPrice, 'gwei'), 'gwei');
```

```typescript
import { createPublicClient, defineChain, http } from 'viem';

const plasma = defineChain({
  id: 9745,
  name: 'Plasma',
  nativeCurrency: {
    name: 'Plasma',
    symbol: 'XPL',
    decimals: 18,
  },
  rpcUrls: {
    default: {
      http: ['https://api-plasma-mainnet.n.dwellir.com/YOUR_API_KEY'],
    },
  },
  blockExplorers: {
    default: {
      name: 'PlasmaScan',
      url: 'https://plasmascan.to',
    },
  },
});

const client = createPublicClient({
  chain: plasma,
  transport: http('https://api-plasma-mainnet.n.dwellir.com/YOUR_API_KEY'),
});

const blockNumber = await client.getBlockNumber();
console.log('Latest block:', blockNumber);
```

```python
from web3 import Web3

web3 = Web3(Web3.HTTPProvider(
  'https://api-plasma-mainnet.n.dwellir.com/YOUR_API_KEY'
))

print('Connected:', web3.is_connected())
print('Chain ID:', web3.eth.chain_id)  # 9745
print('Latest block:', web3.eth.block_number)
```

## Network information

| Parameter    | Value    | Details             |
| ------------ | -------- | ------------------- |
| Chain ID     | 9745     | Plasma Mainnet Beta |
| Block time   | 1 second | PlasmaBFT           |
| Native token | XPL      | 18 decimals         |
| RPC standard | Ethereum | JSON-RPC 2.0        |
| Node type    | Full     | Not archive         |

## API reference

Plasma supports standard Ethereum JSON-RPC methods. Dwellir's endpoint also exposes debug and txpool. Trace methods are not available on this endpoint.

## Add Plasma to MetaMask

Add a custom network.

- Network name: Plasma Mainnet Beta
- RPC URL: `https://api-plasma-mainnet.n.dwellir.com/YOUR_API_KEY`
- Chain ID: 9745
- Currency: XPL
- Explorer: [Plasmascan](https://plasmascan.to/)

## Related guides

- [Stablecoin L1 RPC guide: Arc, Tempo, Plasma and Stable](https://www.dwellir.com/blog/stablechain-rpc-guide)
- [Top Plasma RPC providers compared](https://www.dwellir.com/blog/top-plasma-rpc-providers)
