# txpool_content - Flow EVM RPC Method

Returns the full pending and queued transaction pool for the connected Flow EVM Gateway endpoint. Transactions are grouped first by sender address and then by nonce.

> **Non-standard method.** `txpool_content` is a Geth-style mempool inspection method. It is not part of the core Ethereum Execution API method set, and many shared RPC endpoints disable it because of response size and sensitivity concerns.

> **Why Flow EVM?** Build on the EVM-equivalent layer on Flow blockchain enabling Cadence+Solidity composability with full EVM equivalence on Flow, atomic multi-operation transactions, 40% lower gas fees, and 473% contract growth in 2025.

## When to Use This Method

`txpool_content` is useful for NFT developers, gaming studios, and Solidity devs seeking Cadence interoperability:

- **Replacement Transaction Debugging** - Inspect multiple transactions with the same sender and nonce
- **Mempool Analytics** - Analyze which accounts dominate pending flow and how backlogs are distributed
- **Relayer Operations** - Verify whether submitted transactions are still pending, queued, or replaced
- **Fee Strategy Tuning** - Inspect real mempool fee levels and transaction types across the pending pool

## Best Practices

- Response can be very large on congested networks; be prepared to handle large payloads
- Use txpool\_status for summary statistics instead when you do not need full content
- Filter results client-side for specific addresses of interest to reduce noise
- This is a non-standard method; many shared endpoints disable this for performance reasons

## Request Parameters

This method accepts no parameters.

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "txpool_content",
  "params": [],
  "id": 1
}
```

## Response Fields

- `pending` (`Object, required`): Address-indexed map of processable transactions grouped by nonce
- `queued` (`Object, required`): Address-indexed map of non-processable transactions grouped by nonce

## Successful Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": {
      "0x000000cd5e2aa28b0fbb66219756f36e318a4ed7": {
        "94": {
          "from": "0x000000cd5e2aa28b0fbb66219756f36e318a4ed7",
          "to": "0xe88b4ac89a986048e48e48ff019eee4281a9791f",
          "nonce": "0x5e",
          "gas": "0x7a120",
          "gasPrice": "0x5d21dba00",
          "maxFeePerGas": "0x5d21dba00",
          "maxPriorityFeePerGas": "0x5d21dba00",
          "hash": "0xeb0eb7b61fd61739bfd87667fd787eca81d3af18bb67eaced20a7e1c0f798532",
          "value": "0x0",
          "type": "0x2"
        }
      }
    },
    "queued": {}
  }
}
```

## Error Responses

### Error Response

- Code: `-32601`

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32601,
    "message": "Method not found"
  }
}
```

## Code Examples

cURL
JavaScript
Python
Go

```bash
curl -X POST https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "txpool_content",
    "params": [],
    "id": 1
  }'
```

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

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

const txpool = await provider.send('txpool_content', []);
const pendingAccounts = Object.keys(txpool.pending);
const queuedAccounts = Object.keys(txpool.queued);

console.log('Pending accounts:', pendingAccounts.length);
console.log('Queued accounts:', queuedAccounts.length);

if (pendingAccounts.length > 0) {
  const firstAccount = pendingAccounts[0];
  const firstNonce = Object.keys(txpool.pending[firstAccount])[0];
  console.log('Sample pending tx:', txpool.pending[firstAccount][firstNonce]);
}
```

```python
import requests

response = requests.post(
    'https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY',
    json={
        'jsonrpc': '2.0',
        'method': 'txpool_content',
        'params': [],
        'id': 1,
    },
)

txpool = response.json()['result']
pending_accounts = list(txpool['pending'].keys())
queued_accounts = list(txpool['queued'].keys())

print('Pending accounts:', len(pending_accounts))
print('Queued accounts:', len(queued_accounts))
```

```go
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/ethereum/go-ethereum/rpc"
)

func main() {
    client, err := rpc.Dial("https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY")
    if err != nil {
        log.Fatal(err)
    }

    var txpool map[string]map[string]map[string]map[string]any
    err = client.CallContext(context.Background(), &txpool, "txpool_content")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Pending accounts: %d\n", len(txpool["pending"]))
    fmt.Printf("Queued accounts: %d\n", len(txpool["queued"]))
}
```

## Related Methods

- [`txpool_status`](https://www.dwellir.com/docs/flow-evm-gateway/txpool_status) - Retrieve only pending and queued counters
- [`eth_getTransactionByHash`](https://www.dwellir.com/docs/flow-evm-gateway/eth_getTransactionByHash) - Inspect a single transaction after you identify it in the mempool
- [`eth_sendRawTransaction`](https://www.dwellir.com/docs/flow-evm-gateway/eth_sendRawTransaction) - Broadcast signed transactions to the network
