From 649cd921090b2273b90fa2aa4226732e501eb3a3 Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Thu, 21 Nov 2024 22:26:02 +0200 Subject: [PATCH] feat: add Guru Network mainnet (#3040) * Added Guru Network mainnet * small update * Update index.ts * Update and rename gurunetwork.ts to guruNetwork.ts * Create unlucky-carrots-retire.md --------- Co-authored-by: jxom <7336481+jxom@users.noreply.github.com> --- .changeset/unlucky-carrots-retire.md | 5 +++++ pnpm-lock.yaml | 4 ++-- src/chains/definitions/guruNetwork.ts | 29 +++++++++++++++++++++++++++ src/chains/definitions/guruTestnet.ts | 4 ++-- src/chains/index.ts | 1 + 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .changeset/unlucky-carrots-retire.md create mode 100644 src/chains/definitions/guruNetwork.ts diff --git a/.changeset/unlucky-carrots-retire.md b/.changeset/unlucky-carrots-retire.md new file mode 100644 index 0000000000..cbff1dcefd --- /dev/null +++ b/.changeset/unlucky-carrots-retire.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Added Guru Network. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a981b0c7cd..43a774bcba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,7 +53,7 @@ importers: version: 20.16.12 '@vitest/coverage-v8': specifier: ^1.0.4 - version: 1.0.4(vitest@1.0.4) + version: 1.0.4(vitest@1.0.4(@types/node@20.16.12)(@vitest/ui@1.0.4)(terser@5.36.0)) '@vitest/ui': specifier: ^1.0.4 version: 1.0.4(vitest@1.0.4) @@ -7585,7 +7585,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@1.0.4(vitest@1.0.4)': + '@vitest/coverage-v8@1.0.4(vitest@1.0.4(@types/node@20.16.12)(@vitest/ui@1.0.4)(terser@5.36.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 diff --git a/src/chains/definitions/guruNetwork.ts b/src/chains/definitions/guruNetwork.ts new file mode 100644 index 0000000000..7d70b099b4 --- /dev/null +++ b/src/chains/definitions/guruNetwork.ts @@ -0,0 +1,29 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const guruNetwork = /*#__PURE__*/ defineChain({ + id: 260, + name: 'Guru Network Mainnet', + nativeCurrency: { + name: 'GURU Token', + symbol: 'GURU', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://rpc.gurunetwork.ai/archive/260'], + }, + }, + blockExplorers: { + default: { + name: 'Guruscan', + url: 'https://scan.gurunetwork.ai', + }, + }, + contracts: { + multicall3: { + address: '0xca11bde05977b3631167028862be2a173976ca11', + blockCreated: 271691, + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/guruTestnet.ts b/src/chains/definitions/guruTestnet.ts index e0e7e13455..39155d5054 100644 --- a/src/chains/definitions/guruTestnet.ts +++ b/src/chains/definitions/guruTestnet.ts @@ -4,7 +4,7 @@ export const guruTestnet = /*#__PURE__*/ defineChain({ id: 261, name: 'Guru Network Testnet', nativeCurrency: { - name: 'testGURU', + name: 'tGURU Token', symbol: 'tGURU', decimals: 18, }, @@ -16,7 +16,7 @@ export const guruTestnet = /*#__PURE__*/ defineChain({ blockExplorers: { default: { name: 'Guruscan', - url: 'https://scan.gurunetwork.ai', + url: 'https://sepolia.gurunetwork.ai', }, }, testnet: true, diff --git a/src/chains/index.ts b/src/chains/index.ts index e251c8d2b1..4c06700bab 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -173,6 +173,7 @@ export { goChain } from './definitions/goChain.js' export { godwoken } from './definitions/godwoken.js' export { goerli } from './definitions/goerli.js' export { gravity } from './definitions/gravity.js' +export { guruNetwork } from './definitions/guruNetwork.js' export { guruTestnet } from './definitions/guruTestnet.js' export { ham } from './definitions/ham.js' export { haqqMainnet } from './definitions/haqqMainnet.js'