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

🐳 Add kroma network #1142

Merged
merged 5 commits into from
Sep 14, 2023
Merged
Changes from 3 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
7 changes: 7 additions & 0 deletions .changeset/adding_kroma.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Adding the network kroma mainnet:
nezouse marked this conversation as resolved.
Show resolved Hide resolved

https://blockscout.kroma.network/

https://kroma.network/

it does not have verified contracts yet in the explorer, adding multicall address later.
4 changes: 4 additions & 0 deletions packages/core/src/constants/chainId.ts
Original file line number Diff line number Diff line change
@@ -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,
}
2 changes: 1 addition & 1 deletion packages/core/src/hooks/useConfig.test.tsx
Original file line number Diff line number Diff line change
@@ -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)
})
20 changes: 20 additions & 0 deletions packages/core/src/model/chain/kroma.ts
Original file line number Diff line number Diff line change
@@ -19,3 +19,23 @@ 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),
}