https://github.com/etienne-napoleone/twelvepool
Watch for new txs in a Terra node mempool
https://github.com/etienne-napoleone/twelvepool
blockchain mempool rust
Last synced: about 1 year ago
JSON representation
Watch for new txs in a Terra node mempool
- Host: GitHub
- URL: https://github.com/etienne-napoleone/twelvepool
- Owner: etienne-napoleone
- License: gpl-3.0
- Created: 2021-11-27T14:59:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T20:47:38.000Z (over 2 years ago)
- Last Synced: 2025-05-04T10:56:35.723Z (about 1 year ago)
- Topics: blockchain, mempool, rust
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 10
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# twelvepool
Watch for new txs in a Terra node mempool.
## Example
```rust
use twelvepool::Watcher;
#[tokio::main]
async fn main() {
let mut watcher = Watcher::new(
String::from("http://localhost:26657"), // RPC address
String::from("http://localhost:1317"), // LCD address
None, // Optional reqwest client
None, // Optional interval duration (default to 100ms)
)
.run();
loop {
if let Some(mempool_item) = watcher.recv().await {
if mempool_item.tx.memo == "my memo" {
println!("tx with our memo found (tx hash {})", mempool_item.tx_hash);
}
}
}
}
```