Skip to content

Commit

Permalink
feat: add holesky as supported network
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Feb 20, 2025
1 parent 485026c commit b46c079
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ VITE_ETHEREUM_DEPLOYMENT_BRANCH=
# Ethereum Network Endpoint
VITE_L1_OBSERVER_NODE=

# Holesky Network Endpoint
VITE_HOLESKY_OBSERVER_NODE=

# Arbitrum Network Endpoint
VITE_ARBITRUM_OBSERVER_NODE=

Expand Down
2 changes: 1 addition & 1 deletion config.testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"appEnvironment": "testnet",
"coordinatorURL": "https://testnet.dlc.link/attestor-1",
"attestorSharedConfigurationURL": "https://raw.githubusercontent.com/DLC-link/shared-attestor-configuration/refs/heads/main",
"enabledEthereumNetworkIDs": ["421614", "84532", "11155111"],
"enabledEthereumNetworkIDs": ["421614", "84532", "11155111", "17000"],
"enabledRippleNetworkIDs": ["1"],
"bitcoinNetwork": "testnet",
"bitcoinNetworkIndex": 1,
Expand Down
22 changes: 22 additions & 0 deletions src/app/providers/ethereum-network-configuration.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
baseSepolia,
bsc,
hardhat,
holesky,
mainnet,
sepolia,
} from 'viem/chains';
Expand Down Expand Up @@ -211,6 +212,27 @@ function getEthereumNetworkConfiguration(
),
chain: bsc,
};
case EthereumNetworkID.Holesky:
return {
ethereumExplorerAPIURL: bsc.blockExplorers.default.apiUrl,
websocketURL: appConfiguration.holeskyWebsocket,
httpURL: appConfiguration.holeskyHTTP,
ethereumAttestorChainID: 'evm-holesky',
enabledEthereumNetworks,
dlcManagerContract: getEthereumContractWithProvider(
getEthereumNetworkDeploymentPlans(holesky),
holesky,
'DLCManager',
appConfiguration.holeskyWebsocket
),
iBTCContract: getEthereumContractWithProvider(
getEthereumNetworkDeploymentPlans(holesky),
holesky,
'IBTC',
appConfiguration.holeskyWebsocket
),
chain: holesky,
};
case EthereumNetworkID.Hardhat:
return {
ethereumExplorerAPIURL: '',
Expand Down
2 changes: 2 additions & 0 deletions src/shared/constants/ethereum.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
baseSepolia,
bsc,
hardhat,
holesky,
mainnet,
sepolia,
} from 'viem/chains';
Expand All @@ -20,5 +21,6 @@ export const SUPPORTED_VIEM_CHAINS: Chain[] = [
bsc,
avalanche,
baseSepolia,
holesky,
hardhat,
];
2 changes: 2 additions & 0 deletions src/shared/models/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export interface Configuration {
localAttestorExtendedGroupPublicKey?: string;
l1Websocket: string;
l1HTTP: string;
holeskyWebsocket: string;
holeskyHTTP: string;
arbitrumWebsocket: string;
arbitrumHTTP: string;
baseWebsocket: string;
Expand Down
3 changes: 2 additions & 1 deletion src/shared/models/ethereum-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export interface EthereumNetworkConfiguration {
| 'evm-avax'
| 'evm-bsc'
| 'evm-hardhat-arb'
| 'evm-hardhat-eth';
| 'evm-hardhat-eth'
| 'evm-holesky';
enabledEthereumNetworks: EthereumNetwork[];
dlcManagerContract: Contract;
iBTCContract: Contract;
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default defineConfig(async ({ mode }) => {
appConfiguration.ethereumContractInformations = await fetchEthereumDeploymentPlans(environmentName, branchName, appConfiguration.enabledEthereumNetworkIDs, localDeploymentFilesURL);
const arbitrumURLs: string[] = env.VITE_ARBITRUM_OBSERVER_NODE.split(',');
const l1URLs: string[] = env.VITE_L1_OBSERVER_NODE.split(',');
const holeskyURLs: string[] = env.VITE_HOLESKY_OBSERVER_NODE.split(',');
const baseURLs: string[] = env.VITE_BASE_OBSERVER_NODE.split(',');
const avalancheURLs: string[] = env.VITE_AVALANCHE_OBSERVER_NODE.split(',');
const bscURLs: string[] = env.VITE_BSC_OBSERVER_NODE.split(',');
Expand All @@ -74,6 +75,8 @@ export default defineConfig(async ({ mode }) => {
appConfiguration.arbitrumHTTP = arbitrumURLs[1];
appConfiguration.l1Websocket = l1URLs[0];
appConfiguration.l1HTTP = l1URLs[1];
appConfiguration.holeskyWebsocket = holeskyURLs[0];
appConfiguration.holeskyHTTP = holeskyURLs[1];
appConfiguration.baseWebsocket = baseURLs[0];
appConfiguration.baseHTTP = baseURLs[1];
appConfiguration.avalancheWebsocket = avalancheURLs[0];
Expand Down

0 comments on commit b46c079

Please sign in to comment.