mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-08 20:47:59 -05:00
GraphQL Support for withdrawals (#5496)
Add support for withdrawals in GraphQL, including needed changes to testing infrastructure for shanghai-era blocks. Also align existing adapters with graphql schema optionality. Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
This commit is contained in:
@@ -32,8 +32,14 @@ import com.google.common.io.Resources;
|
||||
/** The Block test util. */
|
||||
public final class BlockTestUtil {
|
||||
|
||||
private BlockTestUtil() {
|
||||
throw new RuntimeException("Utility Class");
|
||||
}
|
||||
|
||||
private static final Supplier<ChainResources> testChainSupplier =
|
||||
Suppliers.memoize(BlockTestUtil::supplyTestChainResources);
|
||||
private static final Supplier<ChainResources> hiveTestChainSupplier =
|
||||
Suppliers.memoize(BlockTestUtil::supplyHiveTestChainResources);
|
||||
private static final Supplier<ChainResources> testChainLondonSupplier =
|
||||
Suppliers.memoize(BlockTestUtil::supplyTestChainLondonResources);
|
||||
private static final Supplier<ChainResources> mainnetChainSupplier =
|
||||
@@ -92,6 +98,15 @@ public final class BlockTestUtil {
|
||||
return testChainSupplier.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets test chain resources for hive tests.
|
||||
*
|
||||
* @return the test chain resources
|
||||
*/
|
||||
public static ChainResources getHiveTestChainResources() {
|
||||
return hiveTestChainSupplier.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets test chain london resources.
|
||||
*
|
||||
@@ -148,6 +163,15 @@ public final class BlockTestUtil {
|
||||
return new ChainResources(genesisURL, blocksURL);
|
||||
}
|
||||
|
||||
private static ChainResources supplyHiveTestChainResources() {
|
||||
final URL genesisURL =
|
||||
ensureFileUrl(BlockTestUtil.class.getClassLoader().getResource("hive/testGenesis.json"));
|
||||
final URL blocksURL =
|
||||
ensureFileUrl(
|
||||
BlockTestUtil.class.getClassLoader().getResource("hive/testBlockchain.blocks"));
|
||||
return new ChainResources(genesisURL, blocksURL);
|
||||
}
|
||||
|
||||
private static ChainResources supplyTestChainLondonResources() {
|
||||
final URL genesisURL =
|
||||
ensureFileUrl(
|
||||
|
||||
BIN
testutil/src/main/resources/hive/testBlockchain.blocks
Normal file
BIN
testutil/src/main/resources/hive/testBlockchain.blocks
Normal file
Binary file not shown.
22
testutil/src/main/resources/hive/testGenesis.json
Normal file
22
testutil/src/main/resources/hive/testGenesis.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"config": {
|
||||
"chainId": 1,
|
||||
"ethash": {
|
||||
},
|
||||
"londonBlock": 33,
|
||||
"shanghaiTime": 1444660030
|
||||
},
|
||||
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1",
|
||||
"difficulty" : "0x020000",
|
||||
"gasLimit" : "0x2fefd8",
|
||||
"timestamp" : "0x54c98c81",
|
||||
"extraData" : "0x42",
|
||||
"mixHash" : "0x2c85bcbce56429100b2108254bb56906257582aeafcbd682bc9af67a9f5aee46",
|
||||
"nonce" : "0x78cc16f7b4f65485",
|
||||
"alloc" : {
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||
"balance" : "0x09184e72a000"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user