Skip to content

Commit 0b953e8

Browse files
afa7789nezouse
andauthored
🐳 Add kroma network (#1142)
* Adding chain kroma * adding multicall address * Update chainId.ts * Update .changeset/adding_kroma.md * Fix lint --------- Co-authored-by: Łukasz Stankiewicz <stankiewicz1998@gmail.com>
1 parent 179f853 commit 0b953e8

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

.changeset/adding_kroma.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@usedapp/core": patch
3+
---
4+
5+
Adding the network kroma mainnet:
6+
7+
https://blockscout.kroma.network/
8+
9+
https://kroma.network/
10+
11+
it does not have verified contracts yet in the explorer, adding multicall address later.

packages/core/src/constants/chainId.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import {
6767
LineaTestnet,
6868
MantleTestnet,
6969
KromaSepoliaTestnet,
70+
KromaMainnet,
7071
} from '../model'
7172

7273
// rough alphabet order (put network from the same chain together)
@@ -138,6 +139,7 @@ export const DEFAULT_SUPPORTED_CHAINS = [
138139
LineaTestnet,
139140
MantleTestnet,
140141
KromaSepoliaTestnet,
142+
KromaMainnet,
141143
]
142144

143145
export enum ChainId {
@@ -208,4 +210,6 @@ export enum ChainId {
208210
LineaTestnet = 59140,
209211
ArbitrumNova = 42170,
210212
MantleTestnet = 5001,
213+
Kroma = 255,
214+
KromaSepolia = 2358,
211215
}

packages/core/src/hooks/useConfig.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('useConfig', () => {
2626
const { result, waitForCurrent } = await renderDAppHook(() => useConfig(), { config: setup.config })
2727
await waitForCurrent((val) => val !== undefined)
2828
expect(result.error).to.be.undefined
29-
expect(result.current.networks?.length).to.eq(67)
29+
expect(result.current.networks?.length).to.eq(68)
3030
expect(result.current.notifications?.checkInterval).to.eq(500)
3131
expect(result.current.notifications?.expirationPeriod).to.eq(5000)
3232
})

packages/core/src/model/chain/kroma.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,22 @@ export const KromaSepoliaTestnet: Chain = {
1919
getExplorerAddressLink: getAddressLink(KromaSepoliaExplorerUrl),
2020
getExplorerTransactionLink: getTransactionLink(KromaSepoliaExplorerUrl),
2121
}
22+
23+
const KromaExplorerUrl = 'https://blockscout.kroma.network/'
24+
25+
export const KromaMainnet: Chain = {
26+
chainId: 255,
27+
chainName: 'Kroma',
28+
isTestChain: false,
29+
isLocalChain: false,
30+
multicallAddress: '0xE3c886498ac54433F2B0E6842FAE421006067751',
31+
rpcUrl: 'https://api.kroma.network/',
32+
nativeCurrency: {
33+
name: 'ETH',
34+
symbol: 'ETH',
35+
decimals: 18,
36+
},
37+
blockExplorerUrl: KromaExplorerUrl,
38+
getExplorerAddressLink: getAddressLink(KromaExplorerUrl),
39+
getExplorerTransactionLink: getTransactionLink(KromaExplorerUrl),
40+
}

0 commit comments

Comments
 (0)