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

feat: add swan chain #2760

Merged
merged 3 commits into from
Sep 23, 2024
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/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 @@ -299,6 +299,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
Loading