Skip to content

Commit

Permalink
add holesky mock
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Nov 2, 2023
1 parent 9fc4592 commit 762bb15
Showing 1 changed file with 320 additions and 15 deletions.
335 changes: 320 additions & 15 deletions packages/admin-ui/src/__mock-backend__/stakerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import {
} from "@dappnode/common";
import { Network } from "@dappnode/types";

export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
{
stakerConfigSet: async () => { },
export const stakerConfig: Pick<
Routes,
"stakerConfigGet" | "stakerConfigSet"
> = {
stakerConfigSet: async () => {},
stakerConfigGet: async <T extends Network>(network: T) => {
switch (network) {
case "mainnet":
Expand Down Expand Up @@ -367,8 +369,9 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
},
{
status: "ok",
dnpName:
"goerli-nethermind.dnp.dappnode.eth" as ExecutionClient<T>,
dnpName: "goerli-nethermind.dnp.dappnode.eth" as ExecutionClient<
T
>,
isInstalled: true,
isRunning: true,
isUpdated: true,
Expand Down Expand Up @@ -482,8 +485,9 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
},
{
status: "ok",
dnpName:
"lighthouse-prater.dnp.dappnode.eth" as ConsensusClient<T>,
dnpName: "lighthouse-prater.dnp.dappnode.eth" as ConsensusClient<
T
>,
isInstalled: true,
isRunning: true,
isUpdated: true,
Expand Down Expand Up @@ -632,13 +636,312 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
},
feeRecipient: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
};

case "holesky":
return {
executionClients: [
{
status: "ok",
dnpName: "holesky-geth.dnp.dappnode.eth" as ExecutionClient<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,
metadata: {
name: "geth.dnp.dappnode.eth",
description: "Geth execution client",
shortDescription: "Geth execution client",
version: "0.1.0"
}
}
},
{
status: "ok",
dnpName: "holesky-nethermind.dnp.dappnode.eth" as ExecutionClient<
T
>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,

metadata: {
name: "nethermind.dnp.dappnode.eth",
description: "Nethermind execution client",
shortDescription: "Nethermind execution client",
version: "0.1.0"
}
}
},
{
status: "ok",
dnpName: "holesky-besu.dnp.dappnode.eth" as ExecutionClient<T>,
isInstalled: true,
isRunning: true,
isUpdated: false,
isSelected: true,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,
metadata: {
name: "besu.dnp.dappnode.eth",
description: "Besu execution client",
shortDescription: "Besu execution client",
version: "0.1.0"
}
}
},
{
status: "ok",
dnpName: "holesky-erigon.dnp.dappnode.eth" as ExecutionClient<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,

metadata: {
name: "erigon.dnp.dappnode.eth",
description: "Erigon execution client",
shortDescription: "Erigon execution client",
version: "0.1.0"
}
}
}
],
consensusClients: [
{
status: "ok",
dnpName: "prysm-holesky.dnp.dappnode.eth" as ConsensusClient<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: true,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,

metadata: {
name: "prysm.dnp.dappnode.eth",
description: "Prysm consensus client",
shortDescription: "Prysm consensus client",
version: "0.1.0"
}
},
useCheckpointSync: true
},
{
status: "ok",
dnpName: "lighthouse-holesky.dnp.dappnode.eth" as ConsensusClient<
T
>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,

metadata: {
name: "lighthouse.dnp.dappnode.eth",
description: "Lighthouse consensus client",
shortDescription: "Lighthouse consensus client",
version: "0.1.0"
}
},
useCheckpointSync: true
},
{
status: "ok",
dnpName: "teku-holesky.dnp.dappnode.eth" as ConsensusClient<T>,
isInstalled: false,
isRunning: false,
isUpdated: true,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,

metadata: {
name: "teku.dnp.dappnode.eth",
description: "Teku consensus client",
shortDescription: "Teku consensus client",
version: "0.1.0"
}
},
useCheckpointSync: true
},
{
status: "ok",
dnpName: "nimbus-holesky.dnp.dappnode.eth" as ConsensusClient<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,
metadata: {
name: "nimbus.dnp.dappnode.eth",
description: "Nimbus consensus client",
shortDescription: "Nimbus consensus client",
version: "0.1.0"
}
},
useCheckpointSync: true
}
],
web3Signer: {
status: "ok",
dnpName: "web3signer-holesky.dnp.dappnode.eth" as Signer<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: true,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,
metadata: {
name: "web3signer.dnp.dappnode.eth",
description: "Web3Signer",
shortDescription: "Web3Signer",
version: "0.1.0"
},
links: {
ui: "http://web3signer-prater.dappnode:9000"
}
}
},
mevBoost: {
status: "ok",
dnpName: "mev-boost-holesky.dnp.dappnode.eth" as MevBoost<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
isSelected: true,
avatarUrl: "",
relays: [
"https://0x8f7b17a74569b7a57e9bdafd2e159380759f5dc3ccbd4bf600414147e8c4e1dc6ebada83c0139ac15850eb6c975e82d0@builder-relay-goerli.blocknative.com",
"https://0xb1d229d9c21298a87846c7022ebeef277dfc321fe674fa45312e20b5b6c400bfde9383f801848d7837ed5fc449083a12@relay-goerli.edennetwork.io",
"https://0x8a72a5ec3e2909fff931c8b42c9e0e6c6e660ac48a98016777fc63a73316b3ffb5c622495106277f8dbcc17a06e92ca3@goerli-relay.securerpc.com/"
],
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,
metadata: {
name: "mevboost.dnp.dappnode.eth",
description: "MEV Boost",
shortDescription: "MEV Boost",
version: "0.1.},0"
}
}
},
feeRecipient: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
};
case "gnosis":
return {
executionClients: [
{
status: "ok",
dnpName:
"nethermind-xdai.dnp.dappnode.eth" as ExecutionClient<T>,
dnpName: "nethermind-xdai.dnp.dappnode.eth" as ExecutionClient<T>,
isInstalled: true,
isRunning: true,
isUpdated: true,
Expand Down Expand Up @@ -668,8 +971,9 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
consensusClients: [
{
status: "ok",
dnpName:
"gnosis-beacon-chain-prysm.dnp.dappnode.eth" as ConsensusClient<T>,
dnpName: "gnosis-beacon-chain-prysm.dnp.dappnode.eth" as ConsensusClient<
T
>,
isInstalled: true,
isRunning: true,
isUpdated: true,
Expand Down Expand Up @@ -698,8 +1002,9 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
},
{
status: "ok",
dnpName:
"lighthouse-gnosis.dnp.dappnode.eth" as ConsensusClient<T>,
dnpName: "lighthouse-gnosis.dnp.dappnode.eth" as ConsensusClient<
T
>,
isInstalled: true,
isRunning: true,
isUpdated: true,
Expand Down Expand Up @@ -875,7 +1180,7 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
version: "0.1.0"
}
}
},
}
/*{
status: "ok",
dnpName: "lukso-erigon.dnp.dappnode.eth" as ExecutionClient<T>,
Expand Down Expand Up @@ -963,7 +1268,7 @@ export const stakerConfig: Pick<Routes, "stakerConfigGet" | "stakerConfigSet"> =
}
},
useCheckpointSync: true
},
}
/*{
status: "ok",
dnpName:
Expand Down

0 comments on commit 762bb15

Please sign in to comment.