Skip to content

Commit

Permalink
Remove newPendingTransaction event.
Browse files Browse the repository at this point in the history
Signed-off-by: bgravenorst <[email protected]>
  • Loading branch information
bgravenorst committed Oct 4, 2024
1 parent f349787 commit 26d0154
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 53 deletions.
7 changes: 1 addition & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions services/concepts/websockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ subscription types are available using the [`eth_subscribe`](../reference/ethere

:::info

For information about how to use the subscription methods to subscribe to events, see the [`eth_subscribe`](../reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx) JSON-RPC method, or see the following tutorials:
The `newPendingTransactions` subscription type is not available for all networks.

For information about how to use the available subscription methods to subscribe to events, see the `eth_subscribe`
JSON-RPC method for the relevant network. You can also see the following tutorials for more information:

- [Track ERC-20 token transfers](../tutorials/ethereum/track-erc-20-token-transfers.md)
- [Subscribe to pending transactions on Ethereum](../tutorials/ethereum/subscribe-to-pending-transactions.md)
Expand All @@ -44,11 +47,16 @@ For information about how to use the subscription methods to subscribe to events

Infura support subscriptions over WebSockets for the following networks:

- [Ethereum](../reference/ethereum/index.md)
- [Arbitrum](../reference/arbitrum/index.md)
- [Avalanche (C-Chain)](../reference/avalanche-c-chain/index.md)
- [Base](../reference/base/index.md)
- [Binance Smart Chain](../reference/bnb-smart-chain/index.md)
- [Blast](../reference/blast/index.md)
- [Celo](../reference/celo/index.md)
- [Ethereum](../reference/ethereum/index.md)
- [Linea](../reference/linea/index.md)
- [Mantle](../reference/mantle/index.md)
- [opBNB](../reference/opbnb/index.md)
- [Optimism](../reference/optimism/index.md)
- [Polygon](../reference/polygon-pos/index.md)
- [ZKsync Era](../reference/zksync/index.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ wscat -c wss://bsc-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0",

```bash
wscat -c wss://bsc-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}'
```

</TabItem>

<TabItem value="newPendingTransactions">

```bash
wscat -c wss://bsc-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}'
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Description from "/services/reference/_partials/subscription-methods/_eth

## Parameters

import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx";
import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx";

<Params />

Expand All @@ -35,6 +35,6 @@ import Request from "./_eth_subscribe-request.mdx";

### Response

import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx";
import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx";

<Response />
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ wscat -c wss://celo-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0"

```bash
wscat -c wss://celo-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}'
```

</TabItem>

<TabItem value="newPendingTransactions">

```bash
wscat -c wss://celo-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}'
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Description from "/services/reference/_partials/subscription-methods/_eth

## Parameters

import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx";
import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx";

<Params />

Expand All @@ -35,6 +35,6 @@ import Request from "./_eth_subscribe-request.mdx";

### Response

import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx";
import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx";

<Response />
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ wscat -c wss://opbnb-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0

```bash
wscat -c wss://opbnb-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}'
```

</TabItem>

<TabItem value="newPendingTransactions">

```bash
wscat -c wss://opbnb-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}'
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: "eth_subscribe"
todo: Is newPendingTransactions` event only mainnet supported?
---

import Tabs from "@theme/Tabs"
Expand All @@ -12,14 +11,10 @@ import Description from "/services/reference/_partials/subscription-methods/_eth

## Parameters

import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx";
import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx";

<Params />

:::note
The `newPendingTransactions` event is only available on mainnet.
:::

## Returns

import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx";
Expand All @@ -40,6 +35,6 @@ import Request from "./_eth_subscribe-request.mdx";

### Response

import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx";
import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx";

<Response />
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ wscat -c wss://zksync-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.

```bash
wscat -c wss://zksync-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}'
```

</TabItem>

<TabItem value="newPendingTransactions">

```bash
wscat -c wss://zksync-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}'
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Description from "/services/reference/_partials/subscription-methods/_eth

## Parameters

import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx";
import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx";

<Params />

Expand All @@ -35,6 +35,6 @@ import Request from "./_eth_subscribe-request.mdx";

### Response

import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx";
import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx";

<Response />

0 comments on commit 26d0154

Please sign in to comment.