forked from cerc-io/laconicd-deprecated
feat: add txpool namespace RPC methods (#146)
* rpc: add txpool namespace and txpool_content endpoint * fix PublicTxPoolAPI naming typo * Update ethereum/rpc/txpool_api.go Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update ethereum/rpc/txpool_api.go Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * rpc: add txpool_inspect method * rpc: add txpool_status method * docs: Update Changelog with TxPool methods * docs: Add txpool namespace methods documentation * fix: removed txpool functions from backend.go Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze
parent
8a2a8d377f
commit
b4d3659547
+41
-3
@@ -144,9 +144,9 @@ Check the JSON-RPC methods and namespaces supported on Ethermint. {synopsis}
|
||||
| `miner_start` | Miner | | |
|
||||
| `miner_stop` | Miner | | |
|
||||
| `miner_setEtherbase` | Miner | | |
|
||||
| `txpool_content` | TXPool | | |
|
||||
| `txpool_inspect` | TXPool | | |
|
||||
| `txpool_status` | TXPool | | |
|
||||
| `txpool_content` | TXPool | ✔ | |
|
||||
| `txpool_inspect` | TXPool | ✔ | |
|
||||
| `txpool_status` | TXPool | ✔ | |
|
||||
|
||||
|
||||
:::tip
|
||||
@@ -693,6 +693,44 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"topics"
|
||||
{"jsonrpc":"2.0","id":1,"result":[]}
|
||||
```
|
||||
|
||||
## TxPool Methods
|
||||
|
||||
### txpool_content
|
||||
|
||||
Returns a list of the exact details of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
||||
|
||||
```json
|
||||
// Request
|
||||
curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_content","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","id":1,"result":{"pending":{},"queued":{}}
|
||||
```
|
||||
|
||||
### txpool_inspect
|
||||
|
||||
Returns a list on text format to summarize all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. This is a method specifically tailored to developers to quickly see the transactions in the pool and find any potential issues.
|
||||
|
||||
```json
|
||||
// Request
|
||||
curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_inspect","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","id":1,"result":{"pending":{},"queued":{}}
|
||||
```
|
||||
|
||||
### txpool_status
|
||||
|
||||
Returns the number of transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
||||
|
||||
```json
|
||||
// Request
|
||||
curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","id":1,"result":{"pending":"0x0","queued":"0x0"}}
|
||||
```
|
||||
|
||||
## WebSocket Methods
|
||||
|
||||
Read about websockets in [events](./../quickstart/events.md) {hide}
|
||||
|
||||
Reference in New Issue
Block a user