From 3d0df01e99682d58927612140979b60b5f10b29b Mon Sep 17 00:00:00 2001 From: inso- <> Date: Fri, 23 Feb 2024 02:51:31 +0000 Subject: [PATCH] Add Blast Sepolia network --- .changeset/adding_BlastSepolia.md | 7 ++++++ packages/core/src/constants/chainId.ts | 3 +++ packages/core/src/hooks/useConfig.test.tsx | 2 +- packages/core/src/model/chain/blast.ts | 25 ++++++++++++++++++++++ packages/core/src/model/chain/index.ts | 1 + 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .changeset/adding_BlastSepolia.md create mode 100644 packages/core/src/model/chain/blast.ts diff --git a/.changeset/adding_BlastSepolia.md b/.changeset/adding_BlastSepolia.md new file mode 100644 index 000000000..50bbeb249 --- /dev/null +++ b/.changeset/adding_BlastSepolia.md @@ -0,0 +1,7 @@ +--- +"@usedapp/core": patch +--- + +Adding the network blast Sepolia testnet: + +https://blast.io/ \ No newline at end of file diff --git a/packages/core/src/constants/chainId.ts b/packages/core/src/constants/chainId.ts index 8f02f9838..b2179cca6 100644 --- a/packages/core/src/constants/chainId.ts +++ b/packages/core/src/constants/chainId.ts @@ -10,6 +10,7 @@ import { AvalancheTestnet, Aurora, AuroraTestnet, + BlastSepoliaTestnet, BSC, BSCTestnet, Canto, @@ -140,6 +141,7 @@ export const DEFAULT_SUPPORTED_CHAINS = [ MantleTestnet, KromaSepoliaTestnet, KromaMainnet, + BlastSepoliaTestnet, ] export enum ChainId { @@ -212,4 +214,5 @@ export enum ChainId { MantleTestnet = 5001, Kroma = 255, KromaSepolia = 2358, + BlastSepolia = 168587773, } diff --git a/packages/core/src/hooks/useConfig.test.tsx b/packages/core/src/hooks/useConfig.test.tsx index 990338728..48a44b930 100644 --- a/packages/core/src/hooks/useConfig.test.tsx +++ b/packages/core/src/hooks/useConfig.test.tsx @@ -26,7 +26,7 @@ describe('useConfig', () => { const { result, waitForCurrent } = await renderDAppHook(() => useConfig(), { config: setup.config }) await waitForCurrent((val) => val !== undefined) expect(result.error).to.be.undefined - expect(result.current.networks?.length).to.eq(68) + expect(result.current.networks?.length).to.eq(69) expect(result.current.notifications?.checkInterval).to.eq(500) expect(result.current.notifications?.expirationPeriod).to.eq(5000) }) diff --git a/packages/core/src/model/chain/blast.ts b/packages/core/src/model/chain/blast.ts new file mode 100644 index 000000000..d2b4585ab --- /dev/null +++ b/packages/core/src/model/chain/blast.ts @@ -0,0 +1,25 @@ +import { Chain } from '../../constants' +import { getAddressLink, getTransactionLink } from '../../helpers/chainExplorerLink' + +const blastSepoliaTestnetExplorerUrl = 'https://testnet.blastscan.io' + +export const BlastSepoliaTestnet: Chain = { + chainId: 168587773, + chainName: 'Blast Sepolia Testnet', + isTestChain: true, + isLocalChain: false, + multicallAddress: '0xcA11bde05977b3631167028862bE2a173976CA11', + rpcUrl: 'https://sepolia.blast.io', + nativeCurrency: { + name: 'SepoliaETH', + symbol: 'ETH', + decimals: 18, + }, + blockExplorerUrl: blastSepoliaTestnetExplorerUrl, + getExplorerAddressLink: getAddressLink(blastSepoliaTestnetExplorerUrl), + getExplorerTransactionLink: getTransactionLink(blastSepoliaTestnetExplorerUrl), +} + +export default { + BlastSepoliaTestnet, +} diff --git a/packages/core/src/model/chain/index.ts b/packages/core/src/model/chain/index.ts index bc945e614..04c0e5232 100644 --- a/packages/core/src/model/chain/index.ts +++ b/packages/core/src/model/chain/index.ts @@ -3,6 +3,7 @@ export * from './local' export * from './arbitrum' export * from './astar' export * from './avalanche' +export * from './blast' export * from './bsc' export * from './boba' export * from './canto'