Optimism
Optimism
Optimism
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_newPendingTransactionFilter registers a server-side filter that watches for transactions entering the OP Mainnet mempool and returns a hex filter ID. Polling that ID with eth_getFilterChanges yields the hashes of pending transactions seen since your last poll. OP Mainnet is the ETH-gas OP Stack rollup at chain ID 10 (0xa), where a single sequencer orders transactions; the pending set you observe reflects what that sequencer has received but not yet sealed into a block. Create the filter against https://optimism.therpc.io/YOUR_API_KEY.
maxFeePerGas and maxPriorityFeePerGas of pending transactions to gauge what tips are landing inclusion on OP Mainnet right now.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string | Hex filter ID. When polled with eth_getFilterChanges, yields an array of new pending transaction hashes since the last poll. |
Try it live in the Optimism playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
eth_getTransactionByHash for each one to read the sender, value, gas fields, or calldata.eth_getTransactionReceipt.eth_subscribe (newPendingTransactions) stream is more efficient than polling this filter.