Skip to content

Commit

Permalink
feat: add Matchain and Testnet (#2825)
Browse files Browse the repository at this point in the history
* Add Matchain and Testnet

* Update matchainTestnet.ts

---------

Co-authored-by: jxom <j@wevm.dev>
  • Loading branch information
fengbaolong and jxom authored Oct 7, 2024
1 parent 3fd4332 commit 66d7a1c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-cup-photo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added Matchain.
20 changes: 20 additions & 0 deletions src/chains/definitions/matchain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const matchain = /*#__PURE__*/ defineChain({
id: 698,
name: 'Matchain',
nativeCurrency: {
name: 'BNB',
symbol: 'BNB',
decimals: 18,
},
rpcUrls: {
default: { http: ['https://rpc.matchain.io'] },
},
blockExplorers: {
default: {
name: 'Matchain Scan',
url: 'https://matchscan.io',
},
},
})
21 changes: 21 additions & 0 deletions src/chains/definitions/matchainTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const matchainTestnet = /*#__PURE__*/ defineChain({
id: 699,
name: 'Matchain Testnet',
nativeCurrency: {
name: 'BNB',
symbol: 'BNB',
decimals: 18,
},
rpcUrls: {
default: { http: ['https://testnet-rpc.matchain.io'] },
},
blockExplorers: {
default: {
name: 'Matchain Scan',
url: 'https://testnet.matchscan.io',
},
},
testnet: true
})
2 changes: 2 additions & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ export { mantaTestnet } from './definitions/mantaTestnet.js'
export { mantle } from './definitions/mantle.js'
export { mantleSepoliaTestnet } from './definitions/mantleSepoliaTestnet.js'
export { mantleTestnet } from './definitions/mantleTestnet.js'
export { matchain } from './definitions/matchain.js'
export { matchainTestnet } from './definitions/matchainTestnet.js'
export { merlin } from './definitions/merlin.js'
export { metachain } from './definitions/metachain.js'
export { metachainIstanbul } from './definitions/metachainIstanbul.js'
Expand Down

0 comments on commit 66d7a1c

Please sign in to comment.