From b61a231670a603f14151975d5eb92837581f8f86 Mon Sep 17 00:00:00 2001 From: sina-london Date: Sun, 29 Sep 2024 11:18:00 +0800 Subject: [PATCH] feat: add viction chain (#2789) * Add vechain chain * Update victionTestnet's contracts * Create one-paper-swim.md --------- Co-authored-by: peterhappynow --- .changeset/one-paper-swim.md | 5 +++++ src/chains/definitions/viction.ts | 19 ++++++++++++++++++ src/chains/definitions/victionTestnet.ts | 25 ++++++++++++++++++++++++ src/chains/index.ts | 2 ++ 4 files changed, 51 insertions(+) create mode 100644 .changeset/one-paper-swim.md create mode 100644 src/chains/definitions/viction.ts create mode 100644 src/chains/definitions/victionTestnet.ts diff --git a/.changeset/one-paper-swim.md b/.changeset/one-paper-swim.md new file mode 100644 index 0000000000..606e8115b7 --- /dev/null +++ b/.changeset/one-paper-swim.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Added viction chain. diff --git a/src/chains/definitions/viction.ts b/src/chains/definitions/viction.ts new file mode 100644 index 0000000000..925bd0e0a0 --- /dev/null +++ b/src/chains/definitions/viction.ts @@ -0,0 +1,19 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const viction = /*#__PURE__*/ defineChain({ + id: 88, + name: 'Viction', + nativeCurrency: { name: 'Viction', symbol: 'VIC', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc.viction.xyz'], + }, + }, + blockExplorers: { + default: { + name: 'VIC Scan', + url: 'https://vicscan.xyz', + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/victionTestnet.ts b/src/chains/definitions/victionTestnet.ts new file mode 100644 index 0000000000..ba562fe847 --- /dev/null +++ b/src/chains/definitions/victionTestnet.ts @@ -0,0 +1,25 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const victionTestnet = /*#__PURE__*/ defineChain({ + id: 89, + name: 'Viction Testnet', + nativeCurrency: { name: 'Viction', symbol: 'VIC', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc-testnet.viction.xyz'], + }, + }, + blockExplorers: { + default: { + name: 'VIC Scan', + url: 'https://testnet.vicscan.xyz', + }, + }, + contracts: { + multicall3: { + address: '0xcA11bde05977b3631167028862bE2a173976CA11', + blockCreated: 12170179, + }, + }, + testnet: true, +}) diff --git a/src/chains/index.ts b/src/chains/index.ts index 5246f51ab0..9126dfdc72 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -338,6 +338,8 @@ export { uniqueQuartz } from './definitions/uniqueQuartz.js' export { uniqueOpal } from './definitions/uniqueOpal.js' export { unreal } from './definitions/unreal.js' export { vechain } from './definitions/vechain.js' +export { viction } from './definitions/viction.js' +export { victionTestnet } from './definitions/victionTestnet.js' export { wanchain } from './definitions/wanchain.js' export { wanchainTestnet } from './definitions/wanchainTestnet.js' export { weaveVMAlphanet } from './definitions/weavevmAlphanet.js'