From fb9eb017e60acb66c6294cc0318197d9097a2fc2 Mon Sep 17 00:00:00 2001 From: wfnuser Date: Sat, 28 Dec 2024 16:52:43 +0800 Subject: [PATCH] feat: support neo test chain --- .gitignore | 1 + src/constants/data.ts | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/.gitignore b/.gitignore index 4c88e44..07753ce 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,7 @@ web_modules/ # .env .env.development.local .env.development.localserver +.env.hackathon .env.test.local .env.production.local .env.local diff --git a/src/constants/data.ts b/src/constants/data.ts index 9203f8a..95933cd 100644 --- a/src/constants/data.ts +++ b/src/constants/data.ts @@ -171,6 +171,15 @@ const mantleSepoliaOptions: SdkCtorOptions = { chainName: 'Mantle Sepolia', } +export const neoTestOptions: SdkCtorOptions = { + networkOptions: { + rpcUrl: 'https://neoxt4seed1.ngd.network', + chainId: 12227332, + contractAddress: '0x98D8D5e44eC86b1F20Bab29955498562B949EC3e', + }, + chainName: 'NeoX T4', +} + const eduChain = { id: 656476, name: 'EduChain', @@ -187,6 +196,21 @@ const eduChain = { }, } +const neoTest = { + id: 12227332, + name: 'NeoX T4', + nativeCurrency: { + name: 'GAS', + symbol: 'GAS', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://neoxt4seed1.ngd.network'], + }, + }, +} + // define supported chains const SUPPORTED_CHAINS: Record = { educhain: eduChain, @@ -195,6 +219,7 @@ const SUPPORTED_CHAINS: Record = { opSepolia: optimismSepolia, opMainnet: optimism, mantleSepolia: mantleSepoliaTestnet, + neoTest: neoTest, } // TODO: move this chain options to a separated chain config file @@ -203,6 +228,7 @@ const CHAIN_OPTIONS: Record = { educhain: openCampusTestOptions, moonbase: moonbaseAlphaOptions, mantleSepolia: mantleSepoliaOptions, + neoTest: neoTestOptions, } const getCurrentChain = (): Chain => {