From 484c8462d5aeeb86a2b687852f64dcb48b9f833d Mon Sep 17 00:00:00 2001 From: Ashish Tripathi Date: Sat, 12 Aug 2023 20:42:55 +0530 Subject: [PATCH] feat: add energy web chains (ewc & volta) (#447) * feat: add energy web chains (ewc & volta) * chore: update changeset * docs: add energy web chains to readme * Update volta.ts * Update ewc.ts * Update smooth-wolves-ring.md --------- Co-authored-by: jxom --- .changeset/smooth-wolves-ring.md | 5 +++++ packages/chains/README.md | 2 ++ packages/chains/src/ewc.ts | 27 +++++++++++++++++++++++++++ packages/chains/src/index.ts | 2 ++ packages/chains/src/volta.ts | 27 +++++++++++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 .changeset/smooth-wolves-ring.md create mode 100644 packages/chains/src/ewc.ts create mode 100644 packages/chains/src/volta.ts diff --git a/.changeset/smooth-wolves-ring.md b/.changeset/smooth-wolves-ring.md new file mode 100644 index 00000000..01e9cd4e --- /dev/null +++ b/.changeset/smooth-wolves-ring.md @@ -0,0 +1,5 @@ +--- +"@wagmi/chains": major +--- + +Added `ewc` & `volta` chains. diff --git a/packages/chains/README.md b/packages/chains/README.md index 4baaa12e..23ddd6f4 100644 --- a/packages/chains/README.md +++ b/packages/chains/README.md @@ -52,6 +52,7 @@ const { chains, provider } = configureChains( - `edgewareTestnet` - `eos` - `eosTestnet` +- `ewc` - `fantom` - `fantomTestnet` - `foundry` @@ -99,6 +100,7 @@ const { chains, provider } = configureChains( - `taraxaTestnet` - `telos` - `telosTestnet` +- `volta` - `zkSync` - `zkSyncTestnet` - `zora` diff --git a/packages/chains/src/ewc.ts b/packages/chains/src/ewc.ts new file mode 100644 index 00000000..f1ed4ca2 --- /dev/null +++ b/packages/chains/src/ewc.ts @@ -0,0 +1,27 @@ +import { Chain } from './types' + +export const ewc = { + id: 246, + name: 'Energy Web Chain', + network: 'ewc', + nativeCurrency: { name: 'EWT', symbol: 'EWT', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc.energyweb.org'], + }, + public: { + http: ['https://rpc.energyweb.org'], + }, + }, + blockExplorers: { + default: { + name: 'Energy Web Chain Explorer', + url: 'https://explorer.energyweb.org', + }, + }, + contracts: { + ensRegistry: { + address: '0x0A6d64413c07E10E890220BBE1c49170080C6Ca0', + }, + }, +} as const satisfies Chain diff --git a/packages/chains/src/index.ts b/packages/chains/src/index.ts index 7176d56a..840c25dd 100644 --- a/packages/chains/src/index.ts +++ b/packages/chains/src/index.ts @@ -37,6 +37,7 @@ export { evmos } from './evmos' export { evmosTestnet } from './evmosTestnet' export { ekta } from './ekta' export { ektaTestnet } from './ektaTestnet' +export { ewc } from './ewc' export { fantom } from './fantom' export { fantomTestnet } from './fantomTestnet' export { fibo } from './fibo' @@ -121,6 +122,7 @@ export { taraxaTestnet } from './taraxaTestnet' export { telos } from './telos' export { telosTestnet } from './telosTestnet' export { thunderTestnet } from './thunderTestnet' +export { volta } from './volta' export { wanchain } from './wanchain' export { wanchainTestnet } from './wanchainTestnet' export { xdc } from './xdc' diff --git a/packages/chains/src/volta.ts b/packages/chains/src/volta.ts new file mode 100644 index 00000000..d974171f --- /dev/null +++ b/packages/chains/src/volta.ts @@ -0,0 +1,27 @@ +import { Chain } from './types' + +export const volta = { + id: 73799, + name: 'Volta Chain', + network: 'volta', + nativeCurrency: { name: 'VT', symbol: 'VT', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://volta-rpc.energyweb.org'], + }, + public: { + http: ['https://volta-rpc.energyweb.org'], + }, + }, + blockExplorers: { + default: { + name: 'Volta Explorer', + url: 'https://volta-explorer.energyweb.org', + }, + }, + contracts: { + ensRegistry: { + address: '0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac', + }, + }, +} as const satisfies Chain