Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add holesky as supported network #252

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading