From 915c6c2b610f5e8a3f47a91d4b99e0a31306b1e0 Mon Sep 17 00:00:00 2001 From: Karel Vuong <95452264+karelvuong@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:08:29 -0500 Subject: [PATCH] chore: Add `treasure` Mainnet and `treasureTopaz` Testnet (#3110) * chore: Add `treasure` Mainnet and `treasureTopaz` Testnet * Create gentle-moles-search.md --------- Co-authored-by: jxom <7336481+jxom@users.noreply.github.com> --- .changeset/gentle-moles-search.md | 5 ++++ src/chains/definitions/treasure.ts | 32 +++++++++++++++++++++++++ src/chains/definitions/treasureTopaz.ts | 32 +++++++++++++++++++++++++ src/chains/index.ts | 2 ++ 4 files changed, 71 insertions(+) create mode 100644 .changeset/gentle-moles-search.md create mode 100644 src/chains/definitions/treasure.ts create mode 100644 src/chains/definitions/treasureTopaz.ts diff --git a/.changeset/gentle-moles-search.md b/.changeset/gentle-moles-search.md new file mode 100644 index 0000000000..2928036230 --- /dev/null +++ b/.changeset/gentle-moles-search.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Added `treasure` Mainnet and `treasureTopaz` Testnet. diff --git a/src/chains/definitions/treasure.ts b/src/chains/definitions/treasure.ts new file mode 100644 index 0000000000..e0c1e8a149 --- /dev/null +++ b/src/chains/definitions/treasure.ts @@ -0,0 +1,32 @@ +import { defineChain } from '../../utils/chain/defineChain.js' +import { chainConfig } from '../../zksync/chainConfig.js' + +export const treasure = /*#__PURE__*/ defineChain({ + ...chainConfig, + id: 61_166, + name: 'Treasure', + nativeCurrency: { + decimals: 18, + name: 'MAGIC', + symbol: 'MAGIC', + }, + rpcUrls: { + default: { + http: ['https://rpc.treasure.lol'], + webSocket: ['wss://rpc.treasure.lol/ws'], + }, + }, + blockExplorers: { + default: { + name: 'Treasure Block Explorer', + url: 'https://treasurescan.io', + }, + }, + contracts: { + multicall3: { + address: '0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a', + blockCreated: 101, + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/treasureTopaz.ts b/src/chains/definitions/treasureTopaz.ts new file mode 100644 index 0000000000..06595f1007 --- /dev/null +++ b/src/chains/definitions/treasureTopaz.ts @@ -0,0 +1,32 @@ +import { defineChain } from '../../utils/chain/defineChain.js' +import { chainConfig } from '../../zksync/chainConfig.js' + +export const treasureTopaz = /*#__PURE__*/ defineChain({ + ...chainConfig, + id: 978_658, + name: 'Treasure Topaz Testnet', + nativeCurrency: { + decimals: 18, + name: 'MAGIC', + symbol: 'MAGIC', + }, + rpcUrls: { + default: { + http: ['https://rpc.topaz.treasure.lol'], + webSocket: ['wss://rpc.topaz.treasure.lol/ws'], + }, + }, + blockExplorers: { + default: { + name: 'Treasure Topaz Block Explorer', + url: 'https://topaz.treasurescan.io', + }, + }, + contracts: { + multicall3: { + address: '0xF9cda624FBC7e059355ce98a31693d299FACd963', + blockCreated: 108112, + }, + }, + testnet: true, +}) diff --git a/src/chains/index.ts b/src/chains/index.ts index 4ccc82b62e..78485eb23f 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -426,6 +426,8 @@ export { thunderCore } from './definitions/thunderCore.js' export { thunderTestnet } from './definitions/thunderTestnet.js' export { tiktrixTestnet } from './definitions/tiktrixTestnet.js' export { tomb } from './definitions/tomb.js' +export { treasure } from './definitions/treasure.js' +export { treasureTopaz } from './definitions/treasureTopaz.js' export { tron } from './definitions/tron.js' export { ubiq } from './definitions/ubiq.js' export { ultron } from './definitions/ultron.js'