Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
feat: Add Oasis Sapphire & Emerald chains (#471)
Browse files Browse the repository at this point in the history
* Create sapphire.ts

* Update sapphire.ts to use hexadecimal chain id (0x5afe)

* Create sapphireTestnet.ts

* Create emerald.ts

* Update sapphire.ts - added webSocket URL

* Update emerald.ts - fixed webSocket URLs

* added WebSocket URL for sapphire testnet & changed testnet token to TEST

* Update emerald.ts

* Update sapphire.ts

* Update sapphireTestnet.ts

* Add changeset

* Ran pnpm lint & lint:fix

* Add Sapphire, Sapphire Testnet & Emerald to index.ts

---------

Co-authored-by: jxom <[email protected]>
  • Loading branch information
CedarMist and jxom authored Aug 14, 2023
1 parent 081419c commit d1ef9b4
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-pandas-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/chains": patch
---

Added Emerald, Sapphire & Sapphire Testnet chains.
34 changes: 34 additions & 0 deletions packages/chains/src/emerald.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Chain } from './types'

export const emerald = {
id: 42262,
name: 'Oasis Emerald',
network: 'emerald',
nativeCurrency: {
decimals: 18,
name: 'Oasis ROSE',
symbol: 'ROSE',
},
rpcUrls: {
default: {
http: ['https://emerald.oasis.dev'],
webSocket: ['wss://emerald.oasis.dev/ws'],
},
public: {
http: ['https://emerald.oasis.dev'],
webSocket: ['wss://emerald.oasis.dev/ws'],
},
},
blockExplorers: {
default: {
name: 'Oasis Explorer',
url: 'https://explorer.emerald.oasis.dev',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 1481392,
},
},
} as const satisfies Chain
3 changes: 3 additions & 0 deletions packages/chains/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export { dfk } from './dfk'
export { dogechain } from './dogechain'
export { edgeware } from './edgeware'
export { edgewareTestnet } from './edgewareTestnet'
export { emerald } from './emerald'
export { eos } from './eos'
export { eosTestnet } from './eosTestnet'
export { evmos } from './evmos'
Expand Down Expand Up @@ -95,6 +96,8 @@ export { ronin } from './ronin'
export { saigon } from './saigon'
export { scrollSepolia } from './scrollSepolia'
export { scrollTestnet } from './scrollTestnet'
export { sapphire } from './sapphire'
export { sapphireTestnet } from './sapphireTestnet'
export { sepolia } from './sepolia'
export { skaleBlockBrawlers } from './skale/brawl'
export { skaleCalypso } from './skale/calypso'
Expand Down
34 changes: 34 additions & 0 deletions packages/chains/src/sapphire.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Chain } from './types'

export const sapphire = {
id: 23294,
name: 'Oasis Sapphire',
network: 'sapphire',
nativeCurrency: {
decimals: 18,
name: 'Oasis ROSE',
symbol: 'ROSE',
},
rpcUrls: {
default: {
http: ['https://sapphire.oasis.io'],
webSocket: ['wss://sapphire.oasis.io/ws'],
},
public: {
http: ['https://sapphire.oasis.io'],
webSocket: ['wss://sapphire.oasis.io/ws'],
},
},
blockExplorers: {
default: {
name: 'Oasis Explorer',
url: 'https://explorer.oasis.io/mainnet/sapphire',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 734531,
},
},
} as const satisfies Chain
28 changes: 28 additions & 0 deletions packages/chains/src/sapphireTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Chain } from './types'

export const sapphireTestnet = {
id: 23295,
name: 'Oasis Sapphire Testnet',
network: 'sapphireTestnet',
nativeCurrency: {
decimals: 18,
name: 'Oasis TEST',
symbol: 'TEST',
},
rpcUrls: {
default: {
http: ['https://testnet.sapphire.oasis.dev'],
webSocket: ['wss://testnet.sapphire.oasis.dev/ws'],
},
public: {
http: ['https://testnet.sapphire.oasis.dev'],
webSocket: ['wss://testnet.sapphire.oasis.dev/ws'],
},
},
blockExplorers: {
default: {
name: 'Oasis Explorer',
url: 'https://explorer.oasis.io/testnet/sapphire',
},
},
} as const satisfies Chain

0 comments on commit d1ef9b4

Please sign in to comment.