Skip to content

Commit

Permalink
feat: add swan chain (#2760)
Browse files Browse the repository at this point in the history
* feat: add swan chain

* Sort import order

* Update perfect-baboons-collect.md

---------

Co-authored-by: jeff-0402 <jeff@clica.tech>
Co-authored-by: jxom <j@wevm.dev>
  • Loading branch information
3 people authored Sep 23, 2024
1 parent 9ed514a commit b70fc5e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-baboons-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added Swan chain.
17 changes: 17 additions & 0 deletions src/chains/definitions/swan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const swan = /*#__PURE__*/ defineChain({
id: 254,
name: 'Swan Chain Mainnet',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://mainnet-rpc.swanchain.org'] },
},
blockExplorers: {
default: {
name: 'Swan Explorer',
url: 'https://swanscan.io',
},
},
testnet: false,
})
17 changes: 17 additions & 0 deletions src/chains/definitions/swanProximaTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const swanProximaTestnet = /*#__PURE__*/ defineChain({
id: 20241133,
name: 'Swan Proxima Testnet',
nativeCurrency: { name: 'Swan Ether', symbol: 'sETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://rpc-proxima.swanchain.io '] },
},
blockExplorers: {
default: {
name: 'Swan Explorer',
url: 'https://proxima-explorer.swanchain.io',
},
},
testnet: true,
})
17 changes: 17 additions & 0 deletions src/chains/definitions/swanSaturnTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const swanSaturnTestnet = /*#__PURE__*/ defineChain({
id: 2024,
name: 'Swan Saturn Testnet',
nativeCurrency: { name: 'Swan Ether', symbol: 'sETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://saturn-rpc.swanchain.io'] },
},
blockExplorers: {
default: {
name: 'Swan Explorer',
url: 'https://saturn-explorer.swanchain.io',
},
},
testnet: true,
})
3 changes: 3 additions & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ export { storyTestnet } from './definitions/storyTestnet.js'
export { silicon } from './definitions/silicon.js'
export { siliconSepolia } from './definitions/siliconSepolia.js'
export { stratis } from './definitions/stratis.js'
export { swan } from './definitions/swan.js'
export { swanProximaTestnet } from './definitions/swanProximaTestnet.js'
export { swanSaturnTestnet } from './definitions/swanSaturnTestnet.js'
export { syscoin } from './definitions/syscoin.js'
export { syscoinTestnet } from './definitions/syscoinTestnet.js'
export { taraxa } from './definitions/taraxa.js'
Expand Down

0 comments on commit b70fc5e

Please sign in to comment.