Skip to content

Commit

Permalink
feat: add Swellchain (#3246)
Browse files Browse the repository at this point in the history
* add : swellchain

* fix : formatting

* add : chainconfig contracts

* Update src/chains/definitions/swellchain.ts

Co-authored-by: Fabian Hug <fabian@swellnetwork.io>

---------

Co-authored-by: Fabian Hug <fabian@swellnetwork.io>
  • Loading branch information
aliberkhsl and fabianhug authored Jan 21, 2025
1 parent 2a2239e commit 6a3e407
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-items-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Add Swellchain
28 changes: 28 additions & 0 deletions src/chains/definitions/swellchain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { chainConfig } from '../../op-stack/chainConfig.js'
import { defineChain } from '../../utils/chain/defineChain.js'

export const swellchain = /*#__PURE__*/ defineChain({
...chainConfig,
id: 1923,
name: 'Swellchain',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://swell-mainnet.alt.technology', 'https://rpc.ankr.com/swell'],
},
},
blockExplorers: {
default: {
name: 'Swell Explorer',
url: 'https://explorer.swellnetwork.io',
apiUrl: 'https://explorer.swellnetwork.io/api',
},
},
contracts: {
...chainConfig.contracts,
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 1,
},
},
})
1 change: 1 addition & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ export { superseedSepolia } from './definitions/superseedSepolia.js'
export { swan } from './definitions/swan.js'
export { swanProximaTestnet } from './definitions/swanProximaTestnet.js'
export { swanSaturnTestnet } from './definitions/swanSaturnTestnet.js'
export { swellchain } from './definitions/swellchain.js'
export { swissdlt } from './definitions/swissdlt.js'
export { syscoin } from './definitions/syscoin.js'
export { syscoinTestnet } from './definitions/syscoinTestnet.js'
Expand Down

0 comments on commit 6a3e407

Please sign in to comment.