Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/public-networks/concepts/transactions/pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ You can configure and monitor the transaction pool using the following methods,
| Method | [`txpool_besuTransactions`](../../reference/api/index.md#txpool_besutransactions) | API method to list transactions in the transaction pool. |
| Method | [`txpool_besuStatistics`](../../reference/api/index.md#txpool_besustatistics) | API method to list statistics of the transaction pool. |
| Method | [`txpool_besuPendingTransactions`](../../reference/api/index.md#txpool_besupendingtransactions) | API method to list pending transactions in the transaction pool. |
| Method | [`txpool_contentFrom`](../../reference/api/index.md#txpool_contentfrom) | API method to list pending and queued transactions for a given sender address. |
| Method | [`txpool_content`](../../reference/api/index.md#txpool_content) | API method to list all pending and queued transactions in the pool, grouped by sender address and nonce. |
| Subscription | [`newPendingTransactions`](../../how-to/use-besu-api/rpc-pubsub.md#pending-transactions) | RPC subscription to notify of transactions added to the transaction pool. |
| Subscription | [`droppedPendingTransactions`](../../how-to/use-besu-api/rpc-pubsub.md#dropped-transactions) | RPC subscription to notify of transactions dropped from the transaction pool. |
Expand Down
94 changes: 94 additions & 0 deletions docs/public-networks/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8110,6 +8110,100 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_content","params":[],"id"
</TabItem>
</Tabs>

### `txpool_contentFrom`

Returns the pending and queued transactions for a given sender address.

#### Parameters

`address`: _string_ - sender address

#### Returns

`result`: _object_ - transaction pool content for the given address:

- `pending`: _object_ - map of nonces to [transaction objects](objects.md#transaction-object), for pending transactions from the given address

- `queued`: _object_ - map of nonces to [transaction objects](objects.md#transaction-object) for queued transactions from the given address

<Tabs>

<TabItem value="curl HTTP request" label="curl HTTP request" default>

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_contentFrom","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"],"id":1}' http://127.0.0.1:8545/ -H "Content-Type: application/json"
```

</TabItem>
<TabItem value="wscat WS request" label="wscat WS request">

```json
{
"jsonrpc": "2.0",
"method": "txpool_contentFrom",
"params": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"],
"id": 1
}
```

</TabItem>
<TabItem value="JSON result" label="JSON result">

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"pending": {
"0": {
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas": "0x5208",
"gasPrice": "0xab5d04c00",
"hash": "0xb7b2f4306c1c228ec94043da73b582594007091a7dfe024b1f8d6d772284e54b",
"input": "0x",
"nonce": "0x0",
"to": "0xf8be4ebda7f62d79a665294ec1263bfdb59aabf2",
"value": "0x0",
"v": "0xfe8",
"r": "0x5beb711e652c6cf0a589d3cea904eefc4f45ce4372652288701d08cc4412086d",
"s": "0x3af14a56e63aa5fb7dcb444a89708363a9d2c1eba1f777c67690288415080ded"
},
"1": {
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas": "0x5208",
"gasPrice": "0xab5d04c00",
"hash": "0x1234abcd5678ef901234abcd5678ef901234abcd5678ef901234abcd5678ef90",
"input": "0x",
"nonce": "0x1",
"to": "0xf8be4ebda7f62d79a665294ec1263bfdb59aabf2",
"value": "0x0",
"v": "0xfe8",
"r": "0x1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"s": "0x2bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
}
},
"queued": {
"3": {
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas": "0x5208",
"gasPrice": "0xab5d04c00",
"hash": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"input": "0x",
"nonce": "0x3",
"to": "0xf8be4ebda7f62d79a665294ec1263bfdb59aabf2",
"value": "0x0",
"v": "0xfe8",
"r": "0x3ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"s": "0x4ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
}
}
}
}
```

</TabItem>
</Tabs>

### `txpool_status`

Returns the number of pending and queued transactions in the pool.
Expand Down
Loading