From 479eb46b2090b237cfc9c826176ef7f0bc6a8e0a Mon Sep 17 00:00:00 2001 From: Peng Ke Date: Sat, 26 Oct 2024 21:56:39 +0800 Subject: [PATCH] feat: add energy chain --- .changeset/dull-cougars-raise.md | 5 +++++ src/chains/definitions/energy.ts | 19 +++++++++++++++++++ src/chains/index.ts | 1 + 3 files changed, 25 insertions(+) create mode 100644 .changeset/dull-cougars-raise.md create mode 100644 src/chains/definitions/energy.ts diff --git a/.changeset/dull-cougars-raise.md b/.changeset/dull-cougars-raise.md new file mode 100644 index 0000000000..0dae192e19 --- /dev/null +++ b/.changeset/dull-cougars-raise.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Added energy chain. diff --git a/src/chains/definitions/energy.ts b/src/chains/definitions/energy.ts new file mode 100644 index 0000000000..e0dc7765c5 --- /dev/null +++ b/src/chains/definitions/energy.ts @@ -0,0 +1,19 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const energy = /*#__PURE__*/ defineChain({ + id: 246, + name: 'Energy Mainnet', + nativeCurrency: { name: 'EWT', symbol: 'EWT', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc.energyweb.org'], + }, + }, + blockExplorers: { + default: { + name: 'EnergyWeb Explorer', + url: 'https://explorer.energyweb.org', + }, + }, + testnet: false, +}) diff --git a/src/chains/index.ts b/src/chains/index.ts index 224d66b160..981d70ea58 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -122,6 +122,7 @@ export { elastosTestnet } from './definitions/elastosTestnet.js' export { electroneum } from './definitions/electroneum.js' export { electroneumTestnet } from './definitions/electroneumTestnet.js' export { elysiumTestnet } from './definitions/elysiumTestnet.js' +export { energy } from './definitions/energy.js' export { enuls } from './definitions/enuls.js' export { eon } from './definitions/eon.js' export { eos } from './definitions/eos.js'