Skip to content

Commit

Permalink
feat: add Unique chains (#2776)
Browse files Browse the repository at this point in the history
* Added Unique chains

* Update unique.ts

* Update uniqueOpal.ts

* Update uniqueQuartz.ts

* Create heavy-countries-rule.md

---------

Co-authored-by: jxom <j@wevm.dev>
  • Loading branch information
Svg70 and jxom authored Sep 25, 2024
1 parent 000a2dc commit c40e999
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-countries-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

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

export const unique = /*#__PURE__*/ defineChain({
id: 8880,
name: 'Unique Mainnet',
nativeCurrency: {
decimals: 18,
name: 'UNQ',
symbol: 'UNQ',
},
rpcUrls: {
default: { http: ['https://rpc.unique.network'] },
},
blockExplorers: {
default: {
name: 'Unique Subscan',
url: 'https://unique.subscan.io/',
},
},
})
21 changes: 21 additions & 0 deletions src/chains/definitions/uniqueOpal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const uniqueOpal = /*#__PURE__*/ defineChain({
id: 8882,
name: 'Opal Testnet',
nativeCurrency: {
decimals: 18,
name: 'OPL',
symbol: 'OPL',
},
rpcUrls: {
default: { http: ['https://rpc-opal.unique.network'] },
},
blockExplorers: {
default: {
name: 'Opal Subscan',
url: 'https://opal.subscan.io/',
},
},
testnet: true,
})
20 changes: 20 additions & 0 deletions src/chains/definitions/uniqueQuartz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const uniqueQuartz = /*#__PURE__*/ defineChain({
id: 8881,
name: 'Quartz Mainnet',
nativeCurrency: {
decimals: 18,
name: 'QTZ',
symbol: 'QTZ',
},
rpcUrls: {
default: { http: ['https://rpc-quartz.unique.network'] },
},
blockExplorers: {
default: {
name: 'Quartz Subscan',
url: 'https://quartz.subscan.io/',
},
},
})
3 changes: 3 additions & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ export { tenet } from './definitions/tenet.js'
export { thaiChain } from './definitions/thaiChain.js'
export { thunderTestnet } from './definitions/thunderTestnet.js'
export { tron } from './definitions/tron.js'
export { unique } from './definitions/unique.js'
export { uniqueQuartz } from './definitions/uniqueQuartz.js'
export { uniqueOpal } from './definitions/uniqueOpal.js'
export { unreal } from './definitions/unreal.js'
export { vechain } from './definitions/vechain.js'
export { wanchain } from './definitions/wanchain.js'
Expand Down

0 comments on commit c40e999

Please sign in to comment.