Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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. |
| 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. |
| Option | [`--tx-pool`](../../reference/cli/options.md#tx-pool) | Option to specify the type of transaction pool to use. |
Expand Down
97 changes: 97 additions & 0 deletions docs/public-networks/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8020,6 +8020,103 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_besuTransactions","params
</TabItem>
</Tabs>

### `txpool_contentFrom`

Returns the pending (executable) and queued (non-executable) transactions for a given sender address.

Pending transactions have consecutive nonces starting from the account's current on-chain nonce.
Queued transactions have nonce gaps and cannot yet be executed.
Comment thread
alexandratran marked this conversation as resolved.
Outdated

#### Parameters

`address`: _string_ - 20-byte account address
Comment thread
alexandratran marked this conversation as resolved.
Outdated

#### Returns

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

- `pending`: _object_ - map of transaction nonce (as decimal string) to [transaction object](objects.md#transaction-object) for executable transactions

- `queued`: _object_ - map of transaction nonce (as decimal string) to [transaction object](objects.md#transaction-object) for non-executable transactions
Comment thread
alexandratran marked this conversation as resolved.
Outdated

<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