Skip to content

Commit 6b62e13

Browse files
authored
feat: add ethereum support (#912)
1 parent f85769f commit 6b62e13

File tree

16 files changed

+309
-169
lines changed

16 files changed

+309
-169
lines changed

Cargo.lock

Lines changed: 0 additions & 133 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ zeromq = ["zmq"]
2020
u5c = ["utxorpc", "futures"]
2121
mithril = ["mithril-client"]
2222
hydra = ["tungstenite", "tokio-tungstenite", "futures-util", "bytes"]
23-
eth = ["futures-util"]
23+
eth = ["futures-util", "alloy"]
2424
btc = ["bitcoind-async-client", "corepc-types"]
2525
# elasticsearch = auto feature flag
2626
# kafka = auto feature flag
@@ -86,9 +86,7 @@ bytes = { version = "1.7.2", optional = true }
8686
zmq = { version = "0.10.0", optional = true }
8787
bitcoind-async-client = { version = "0.6.0", optional = true }
8888
corepc-types = { version = "0.10.1", optional = true }
89-
90-
# TODO(p): add feature
91-
alloy = { version = "1.0.38", features = ["full"] }
89+
alloy = { version = "1.0.38", features = ["provider-ws"], optional = true }
9290

9391
[dev-dependencies]
9492
goldenfile = "1.7.3"

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ The data pipeline is implemented by the [Gasket](https://github.com/construkts/g
3939

4040
### CLI to Watch Live Transactions
4141

42-
You can run `oura watch cardano <socket>` to print Cardano transaction data into the terminal from the tip of a local or remote node, or `oura watch bitcoin <rpc_host>` to watch Bitcoin blockchain events. These commands are useful as debugging tools for developers or if you're just curious to see what's going on in the network (for example, to see airdrops as they happen or oracles posting new information).
42+
You can run:
43+
- `oura watch cardano <socket>` to print Cardano transaction data into the terminal from the tip of a local or remote node
44+
- `oura watch bitcoin <rpc_host>` to watch Bitcoin blockchain events
45+
- `oura watch ethereum <url>` to watch Ethereum blockchain events via WebSocket.
46+
47+
These commands are useful as debugging tools for developers or if you're just curious to see what's going on in the network (for example, to see airdrops as they happen or oracles posting new information).
4348

4449
### As a Bridge to Other Persistence Mechanisms
4550

docs/v3/index.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ The data pipeline makes heavy use (maybe a bit too much) of multi-threading and
2424

2525
### CLI to Watch Live Transactions
2626

27-
You can run `oura watch cardano <socket>` to print Cardano transaction data into the terminal from the tip of a local or remote node, or `oura watch bitcoin <rpc_host>` to watch Bitcoin blockchain events. These commands are useful as debugging tools for developers or if you're just curious to see what's going on in the network (for example, to see airdrops as they happen or oracles posting new information).
27+
You can run:
28+
- `oura watch cardano <socket>` to print Cardano transaction data into the terminal from the tip of a local or remote node
29+
- `oura watch bitcoin <rpc_host>` to watch Bitcoin blockchain events
30+
- `oura watch ethereum <url>` to watch Ethereum blockchain events via WebSocket.
31+
32+
These commands are useful as debugging tools for developers or if you're just curious to see what's going on in the network (for example, to see airdrops as they happen or oracles posting new information).
2833

2934
### As a Bridge to Other Persistence Mechanisms
3035

docs/v3/sources/btc.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: Bitcoin RPC
3-
sidebar:
4-
label: Bitcoin
53
---
64

75
The Bitcoin RPC source connects to a Bitcoin Core node via JSON-RPC to fetch block data. It polls the node at regular intervals to detect new blocks and streams them through the Oura pipeline.
@@ -12,7 +10,7 @@ The following snippet shows an example of how to set up a Bitcoin RPC source:
1210

1311
```toml
1412
[source]
15-
type = "Bitcoin"
13+
type = "bitcoin-rpc"
1614
rpc_url = "http://localhost:8332"
1715
rpc_user = "myuser"
1816
rpc_password = "mypassword"
@@ -21,7 +19,7 @@ rpc_interval = 30
2119

2220
### Section `source`:
2321

24-
- `type`: this field must be set to the literal value `Bitcoin`.
22+
- `type`: this field must be set to the literal value `bitcoin-rpc`.
2523
- `rpc_url`: the URL of the Bitcoin RPC server (required).
2624
- `rpc_user`: username for RPC authentication (optional).
2725
- `rpc_password`: password for RPC authentication (optional).
@@ -37,7 +35,7 @@ The Bitcoin RPC source supports optional authentication. If your Bitcoin node re
3735

3836
```toml
3937
[source]
40-
type = "Bitcoin"
38+
type = "bitcoin-rpc"
4139
rpc_url = "http://localhost:8332"
4240
rpc_user = "bitcoinrpc"
4341
rpc_password = "mypassword123"
@@ -48,7 +46,7 @@ rpc_interval = 30
4846

4947
```toml
5048
[source]
51-
type = "Bitcoin"
49+
type = "bitcoin-rpc"
5250
rpc_url = "http://public-bitcoin-node.example.com:8332"
5351
rpc_interval = 60
5452
```
@@ -57,7 +55,7 @@ rpc_interval = 60
5755

5856
```toml
5957
[source]
60-
type = "Bitcoin"
58+
type = "bitcoin-rpc"
6159
rpc_url = "http://localhost:18332"
6260
rpc_user = "testuser"
6361
rpc_password = "testpass"

0 commit comments

Comments
 (0)