diff --git a/.changeset/adding_kroma.md b/.changeset/adding_kroma.md new file mode 100644 index 000000000..480c21d05 --- /dev/null +++ b/.changeset/adding_kroma.md @@ -0,0 +1,11 @@ +--- +"@usedapp/core": patch +--- + +Adding the network kroma mainnet: + +https://blockscout.kroma.network/ + +https://kroma.network/ + +it does not have verified contracts yet in the explorer, adding multicall address later. diff --git a/packages/core/src/constants/chainId.ts b/packages/core/src/constants/chainId.ts index 3f9c607c2..8f02f9838 100644 --- a/packages/core/src/constants/chainId.ts +++ b/packages/core/src/constants/chainId.ts @@ -67,6 +67,7 @@ import { LineaTestnet, MantleTestnet, KromaSepoliaTestnet, + KromaMainnet, } from '../model' // rough alphabet order (put network from the same chain together) @@ -138,6 +139,7 @@ export const DEFAULT_SUPPORTED_CHAINS = [ LineaTestnet, MantleTestnet, KromaSepoliaTestnet, + KromaMainnet, ] export enum ChainId { @@ -208,4 +210,6 @@ export enum ChainId { LineaTestnet = 59140, ArbitrumNova = 42170, MantleTestnet = 5001, + Kroma = 255, + KromaSepolia = 2358, } diff --git a/packages/core/src/hooks/useConfig.test.tsx b/packages/core/src/hooks/useConfig.test.tsx index 21c64cd86..990338728 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(67) + expect(result.current.networks?.length).to.eq(68) expect(result.current.notifications?.checkInterval).to.eq(500) expect(result.current.notifications?.expirationPeriod).to.eq(5000) }) diff --git a/packages/core/src/model/chain/kroma.ts b/packages/core/src/model/chain/kroma.ts index 354da1209..2c66587ed 100644 --- a/packages/core/src/model/chain/kroma.ts +++ b/packages/core/src/model/chain/kroma.ts @@ -19,3 +19,22 @@ export const KromaSepoliaTestnet: Chain = { getExplorerAddressLink: getAddressLink(KromaSepoliaExplorerUrl), getExplorerTransactionLink: getTransactionLink(KromaSepoliaExplorerUrl), } + +const KromaExplorerUrl = 'https://blockscout.kroma.network/' + +export const KromaMainnet: Chain = { + chainId: 255, + chainName: 'Kroma', + isTestChain: false, + isLocalChain: false, + multicallAddress: '0xE3c886498ac54433F2B0E6842FAE421006067751', + rpcUrl: 'https://api.kroma.network/', + nativeCurrency: { + name: 'ETH', + symbol: 'ETH', + decimals: 18, + }, + blockExplorerUrl: KromaExplorerUrl, + getExplorerAddressLink: getAddressLink(KromaExplorerUrl), + getExplorerTransactionLink: getTransactionLink(KromaExplorerUrl), +}