Skip to content

Commit 87f04ad

Browse files
committed
solution: enable Hoodi and Bitcoin Testnet 4
1 parent fd26385 commit 87f04ad

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Blockchains support:
4343
- Ethereum and Ethereum Classic
4444
- Various Ethereum testnets
4545
- Bitcoin
46-
- Bitcoin testnet
46+
- Bitcoin testnets
4747
4848
image::dshackle-intro.png[alt="",width=80%,align="center"]
4949

docs/04-upstream-config.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,29 @@ Supported upstream protocols:
1010
1111
Those protocols can be configures with additional security, TLS and authentication.
1212

13+
[#supported-blockchains]
14+
=== Supported Blockchains
15+
16+
=== Ethereum
17+
18+
- `ethereum`, `eth`
19+
- `ethereum-classic`, `etc`
20+
- `polygon`, `matic`
21+
- `morden` (Testnet, Deprecated)
22+
- `kovan` (Testnet, Deprecated)
23+
- `rinkeby` (Testnet, Deprecated)
24+
- `ropsten` (Testnet, Deprecated)
25+
- `goerli` (Testnet, Deprecated)
26+
- `holesky` (Testnet)
27+
- `sepolia` (Testnet)
28+
- `hoodi` (Testnet)
29+
30+
=== Bitcoin
31+
32+
- `bitcoin`
33+
- `bitcoin-testnet-v3` (Testnet, Deprecated)
34+
- `bitcoin-testnet-v4` (Testnet)
35+
1336
=== Notes on upstream configuration
1437

1538
==== Ethereum

docs/reference-configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ configuration, and may be omitted for most of the situations.
772772
| yes
773773
| Blockchain which is the provided by the upstream.
774774
Cluster may have multiple upstreams for a single blockchain.
775-
Accepted types: `bitcoin`, `bitcoin-testnet`, `ethereum`, `ethereum-classic`, or `sepolia-testnet`
775+
Accepted types: `bitcoin`, `bitcoin-testnet-v4`, `ethereum`, `ethereum-classic`, `sepolia`, `hoodi`, etc. See link:04-upstream-config.adoc#supported-blockchains[Upstream Config] docs for the full list.
776776

777777

778778
| `labels`

src/main/kotlin/io/emeraldpay/dshackle/Global.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,18 @@ class Global {
5959
"holesky-testnet" to Chain.TESTNET_HOLESKY,
6060
"sepolia" to Chain.TESTNET_SEPOLIA,
6161
"sepolia-testnet" to Chain.TESTNET_SEPOLIA,
62+
"hoodi" to Chain.TESTNET_HOODI,
63+
"hoodi-testnet" to Chain.TESTNET_HOODI,
6264
"rinkeby" to Chain.TESTNET_RINKEBY,
6365
"rinkeby-testnet" to Chain.TESTNET_RINKEBY,
6466
"ropsten" to Chain.TESTNET_ROPSTEN,
6567
"ropsten-testnet" to Chain.TESTNET_ROPSTEN,
6668
"bitcoin" to Chain.BITCOIN,
67-
"bitcoin-testnet" to Chain.TESTNET_BITCOIN
69+
"bitcoin-testnet" to Chain.TESTNET_BITCOIN,
70+
"bitcoin-testnet-3" to Chain.TESTNET_BITCOIN,
71+
"bitcoin-testnet-v3" to Chain.TESTNET_BITCOIN,
72+
"bitcoin-testnet-4" to Chain.TESTNET_BITCOIN_V4,
73+
"bitcoin-testnet-v4" to Chain.TESTNET_BITCOIN_V4
6874
)
6975

7076
fun chainById(id: String?): Chain {

src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ class DefaultEthereumMethods(
149149
Chain.TESTNET_SEPOLIA == chain -> {
150150
"\"11155111\""
151151
}
152+
Chain.TESTNET_HOODI == chain -> {
153+
"\"560048\""
154+
}
152155
else -> throw RpcException(-32602, "Invalid chain")
153156
}
154157
}
@@ -184,6 +187,9 @@ class DefaultEthereumMethods(
184187
Chain.TESTNET_SEPOLIA == chain -> {
185188
"\"0xaa36a7\""
186189
}
190+
Chain.TESTNET_HOODI == chain -> {
191+
"\"0x88bb0\""
192+
}
187193
else -> throw RpcException(-32602, "Invalid chain")
188194
}
189195
}

0 commit comments

Comments
 (0)