Skip to content

Commit

Permalink
feat: add Electroneum Mainnet and Testnet (#2837)
Browse files Browse the repository at this point in the history
  • Loading branch information
qi-0826 authored Oct 10, 2024
1 parent 4846364 commit 2f46c00
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-bananas-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

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

export const electroneum = /*#__PURE__*/ defineChain({
id: 52014,
name: 'Electroneum Mainnet',
nativeCurrency: {
name: 'ETN',
symbol: 'ETN',
decimals: 18,
},
rpcUrls: {
default: {
http: ['https://rpc.electroneum.com'],
},
},
blockExplorers: {
default: {
name: 'Electroneum Block Explorer',
url: 'https://blockexplorer.electroneum.com',
},
},
testnet: false,
})
23 changes: 23 additions & 0 deletions src/chains/definitions/electroneumTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const electroneumTestnet = /*#__PURE__*/ defineChain({
id: 5201420,
name: 'Electroneum Testnet',
nativeCurrency: {
name: 'ETN',
symbol: 'ETN',
decimals: 18,
},
rpcUrls: {
default: {
http: ['https://testnet-rpc.electroneum.com'],
},
},
blockExplorers: {
default: {
name: 'Electroneum Block Explorer',
url: 'https://blockexplorer.thesecurityteam.rocks',
},
},
testnet: true,
})
2 changes: 2 additions & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export { evmos } from './definitions/evmos.js'
export { evmosTestnet } from './definitions/evmosTestnet.js'
export { ekta } from './definitions/ekta.js'
export { ektaTestnet } from './definitions/ektaTestnet.js'
export { electroneum } from './definitions/electroneum.js'
export { electroneumTestnet } from './definitions/electroneumTestnet.js'
export { fantom } from './definitions/fantom.js'
export { fantomSonicTestnet } from './definitions/fantomSonicTestnet.js'
export { fantomTestnet } from './definitions/fantomTestnet.js'
Expand Down

0 comments on commit 2f46c00

Please sign in to comment.