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 Soneium mainnet #3226

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/hungry-wombats-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Adding Soneium mainnet
1 change: 1 addition & 0 deletions site/pages/op-stack/chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
optimism, // [!code hl]
optimismGoerli, // [!code hl]
optimismSepolia, // [!code hl]
soneium, // [!code hl]
soneiumMinato, // [!code hl]
zircuit, // [!code hl]
zircuitTestnet, // [!code hl]
Expand Down
53 changes: 53 additions & 0 deletions src/chains/definitions/soneium.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { chainConfig } from '../../op-stack/chainConfig.js'
import { defineChain } from '../../utils/chain/defineChain.js'

const sourceId = 1 // mainnet

export const soneium = /*#__PURE__*/ defineChain({
...chainConfig,
id: 1868,
name: 'Soneium Mainnet',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://rpc.soneium.org'],
},
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://soneium.blockscout.com',
apiUrl: 'https://soneium.blockscout.com/api',
},
},
contracts: {
...chainConfig.contracts,
disputeGameFactory: {
[sourceId]: {
address: "0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0",
},
},
l2OutputOracle: {
[sourceId]: {
address: "0x0000000000000000000000000000000000000000",
},
},
portal: {
[sourceId]: {
address: "0x88e529a6ccd302c948689cd5156c83d4614fae92",
blockCreated: 7061266,
},
},
l1StandardBridge: {
[sourceId]: {
address: "0xeb9bf100225c214efc3e7c651ebbadcf85177607",
blockCreated: 7061266,
},
},
multicall3: {
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
blockCreated: 1,
},
Comment on lines +25 to +50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jxom,
Please refer to the documentation here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jxom Soneium is going to join Superchain with this PR

},
sourceId,
})
1 change: 1 addition & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ export { skaleTitanTestnet } from './definitions/skale/titanTestnet.js'
export { sketchpad } from './definitions/sketchpad.js'
export { snax } from './definitions/snax.js'
export { snaxTestnet } from './definitions/snaxTestnet.js'
export { soneium } from './definitions/soneium.js'
export { soneiumMinato } from './definitions/soneiumMinato.js'
export { sonic } from './definitions/sonic.js'
export { sonicTestnet } from './definitions/sonicTestnet.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 @@ -17,6 +17,7 @@ export { pgnTestnet } from '../chains/definitions/pgnTestnet.js'
export { shape } from '../chains/definitions/shape.js'
export { snax } from '../chains/definitions/snax.js'
export { snaxTestnet } from '../chains/definitions/snaxTestnet.js'
export { soneium } from '../chains/definitions/soneium.js'
export { soneiumMinato } from '../chains/definitions/soneiumMinato.js'
export { unichainSepolia } from '../chains/definitions/unichainSepolia.js'
export { worldchain } from '../chains/definitions/worldchain.js'
Expand Down