From a25864b336dbca800a8f5e598dd8b808194245e3 Mon Sep 17 00:00:00 2001 From: parchedpanda <65277457+qi-0826@users.noreply.github.com> Date: Thu, 7 Nov 2024 04:54:08 +0800 Subject: [PATCH] feat: add diode prenet (#2972) --- .changeset/two-onions-stare.md | 5 +++++ src/chains/definitions/diode.ts | 24 ++++++++++++++++++++++++ src/chains/index.ts | 1 + 3 files changed, 30 insertions(+) create mode 100644 .changeset/two-onions-stare.md create mode 100644 src/chains/definitions/diode.ts diff --git a/.changeset/two-onions-stare.md b/.changeset/two-onions-stare.md new file mode 100644 index 0000000000..cbe2e2a2b8 --- /dev/null +++ b/.changeset/two-onions-stare.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Added Diode Prenet. diff --git a/src/chains/definitions/diode.ts b/src/chains/definitions/diode.ts new file mode 100644 index 0000000000..bf6e16a5e8 --- /dev/null +++ b/src/chains/definitions/diode.ts @@ -0,0 +1,24 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const diode = /*#__PURE__*/ defineChain({ + id: 15, + name: 'Diode Prenet', + nativeCurrency: { + decimals: 18, + name: 'DIODE', + symbol: 'DIODE', + }, + rpcUrls: { + default: { + http: ['https://prenet.diode.io:8443'], + webSocket: ['wss://prenet.diode.io:8443/ws'], + }, + }, + blockExplorers: { + default: { + name: 'Diode Explorer', + url: 'https://diode.io/prenet', + }, + }, + testnet: false, +}) diff --git a/src/chains/index.ts b/src/chains/index.ts index 2c1573322b..e2de1204e1 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -98,6 +98,7 @@ export { defichainEvm } from './definitions/defichainEvm.js' export { defichainEvmTestnet } from './definitions/defichainEvmTestnet.js' export { degen } from './definitions/degen.js' export { dfk } from './definitions/dfk.js' +export { diode } from './definitions/diode.js' export { dodochainTestnet } from './definitions/dodochainTestnet.js' export { dogechain } from './definitions/dogechain.js' export { dosChain } from './definitions/dosChain.js'