Skip to content

Commit

Permalink
feat: add Ink Sepolia support (#2942)
Browse files Browse the repository at this point in the history
* Adding in Ink Sepolia support

* Added in changeset
  • Loading branch information
ink-alexander authored Oct 29, 2024
1 parent e6905ba commit 12347cf
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-hornets-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added Ink Sepolia chain configurations
1 change: 1 addition & 0 deletions site/pages/op-stack/chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
baseSepolia, // [!code hl]
fraxtal, // [!code hl]
fraxtalTestnet, // [!code hl]
inkSepolia, // [!code hl]
optimism, // [!code hl]
optimismGoerli, // [!code hl]
optimismSepolia, // [!code hl]
Expand Down
43 changes: 43 additions & 0 deletions src/chains/definitions/inkSepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { chainConfig } from '../../op-stack/chainConfig.js'
import { defineChain } from '../../utils/chain/defineChain.js'

const sourceId = 11_155_111 // sepolia

export const inkSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
id: 763373,
name: 'Ink Sepolia',
nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://rpc-gel-sepolia.inkonchain.com'],
},
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://explorer-sepolia.inkonchain.com/',
apiUrl: 'https://explorer-sepolia.inkonchain.com/api/v2',
},
},
contracts: {
...chainConfig.contracts,
disputeGameFactory: {
[sourceId]: {
address: '0x860e626c700af381133d9f4af31412a2d1db3d5d',
},
},
portal: {
[sourceId]: {
address: '0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7',
},
},
l1StandardBridge: {
[sourceId]: {
address: '0x33f60714bbd74d62b66d79213c348614de51901c',
},
},
},
testnet: true,
sourceId,
})
1 change: 1 addition & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export { hychainTestnet } from './definitions/hychainTestnet.js'
export { immutableZkEvm } from './definitions/immutableZkEvm.js'
export { immutableZkEvmTestnet } from './definitions/immutableZkEvmTestnet.js'
export { inEVM } from './definitions/inEVM.js'
export { inkSepolia } from './definitions/inkSepolia.js'
export { iota } from './definitions/iota.js'
export { iotaTestnet } from './definitions/iotaTestnet.js'
export { iotex } from './definitions/iotex.js'
Expand Down
1 change: 1 addition & 0 deletions src/op-stack/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export { baseGoerli } from '../chains/definitions/baseGoerli.js'
export { baseSepolia } from '../chains/definitions/baseSepolia.js'
export { fraxtal } from '../chains/definitions/fraxtal.js'
export { fraxtalTestnet } from '../chains/definitions/fraxtalTestnet.js'
export { inkSepolia } from '../chains/definitions/inkSepolia.js'
export { metalL2 } from '../chains/definitions/metalL2.js'
export { optimism } from '../chains/definitions/optimism.js'
export { optimismGoerli } from '../chains/definitions/optimismGoerli.js'
Expand Down

0 comments on commit 12347cf

Please sign in to comment.