Skip to content

Commit

Permalink
feat: support neo test chain
Browse files Browse the repository at this point in the history
  • Loading branch information
wfnuser committed Dec 28, 2024
1 parent 445e9f9 commit fb9eb01
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ web_modules/
# .env
.env.development.local
.env.development.localserver
.env.hackathon
.env.test.local
.env.production.local
.env.local
Expand Down
26 changes: 26 additions & 0 deletions src/constants/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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<string, Chain> = {
educhain: eduChain,
Expand All @@ -195,6 +219,7 @@ const SUPPORTED_CHAINS: Record<string, Chain> = {
opSepolia: optimismSepolia,
opMainnet: optimism,
mantleSepolia: mantleSepoliaTestnet,
neoTest: neoTest,
}

// TODO: move this chain options to a separated chain config file
Expand All @@ -203,6 +228,7 @@ const CHAIN_OPTIONS: Record<string, SdkCtorOptions> = {
educhain: openCampusTestOptions,
moonbase: moonbaseAlphaOptions,
mantleSepolia: mantleSepoliaOptions,
neoTest: neoTestOptions,
}

const getCurrentChain = (): Chain => {
Expand Down

0 comments on commit fb9eb01

Please sign in to comment.