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

Commit

Permalink
feat(chains): add moonbeam, moonriver and moonbaseAlpha (#104)
Browse files Browse the repository at this point in the history
* Add moonbeam, moonriver and moonbaseAlpha chains

* Update shiny-weeks-marry.md

* Update moonbaseAlpha.ts

* Update moonbeam.ts

* Update moonriver.ts

* Update moonbeam.ts

* Update moonbaseAlpha.ts

* Update moonriver.ts

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
  • Loading branch information
ismaventuras and jxom authored Feb 8, 2023
1 parent 5d121f2 commit 51a5c32
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-weeks-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/chains': patch
---

Added Moonbeam, Moonriver, & Moonbase Alpha chains.
3 changes: 3 additions & 0 deletions packages/chains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const { chains, provider } = configureChains(
- `mainnet`
- `metis`
- `metisGoerli`
- `moonbaseAlpha`
- `moonbeam`
- `moonriver`
- `okc`
- `optimism`
- `optimismGoerli`
Expand Down
3 changes: 3 additions & 0 deletions packages/chains/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export { localhost } from './localhost'
export { mainnet } from './mainnet'
export { metis } from './metis'
export { metisGoerli } from './metisGoerli'
export { moonbaseAlpha } from './moonbaseAlpha'
export { moonbeam } from './moonbeam'
export { moonriver } from './moonriver'
export { okc } from './okc'
export { optimism } from './optimism'
export { optimismGoerli } from './optimismGoerli'
Expand Down
39 changes: 39 additions & 0 deletions packages/chains/src/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Chain } from './types'

export const moonbaseAlpha = {
id: 1287,
name: 'Moonbase Alpha',
network: 'moonbase-alpha',
nativeCurrency: {
decimals: 18,
name: 'DEV',
symbol: 'DEV',
},
rpcUrls: {
default: {
http: ['https://rpc.api.moonbase.moonbeam.network'],
webSocket: ['wss://wss.api.moonbase.moonbeam.network'],
},
public: {
http: ['https://rpc.api.moonbase.moonbeam.network'],
webSocket: ['wss://wss.api.moonbase.moonbeam.network'],
},
},
blockExplorers: {
default: {
name: 'Moonscan',
url: 'https://moonbase.moonscan.io',
},
etherscan: {
name: 'Moonscan',
url: 'https://moonbase.moonscan.io',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 1850686,
},
},
testnet: true,
} as const satisfies Chain
39 changes: 39 additions & 0 deletions packages/chains/src/moonbeam.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Chain } from './types'

export const moonbeam = {
id: 1284,
name: 'Moonbeam',
network: 'moonbeam',
nativeCurrency: {
decimals: 18,
name: 'GLMR',
symbol: 'GLMR',
},
rpcUrls: {
public: {
http: ['https://moonbeam.public.blastapi.io'],
webSocket: ['wss://moonbeam.public.blastapi.io'],
},
default: {
http: ['https://moonbeam.public.blastapi.io'],
webSocket: ['wss://moonbeam.public.blastapi.io'],
},
},
blockExplorers: {
default: {
name: 'Moonscan',
url: 'https://moonscan.io',
},
etherscan: {
name: 'Moonscan',
url: 'https://moonscan.io',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 609002,
},
},
testnet: false,
} as const satisfies Chain
39 changes: 39 additions & 0 deletions packages/chains/src/moonriver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Chain } from './types'

export const moonriver = {
id: 1285,
name: 'Moonriver',
network: 'moonriver',
nativeCurrency: {
decimals: 18,
name: 'MOVR',
symbol: 'MOVR',
},
rpcUrls: {
public: {
http: ['https://moonriver.public.blastapi.io'],
webSocket: ['wss://moonriver.public.blastapi.io'],
},
default: {
http: ['https://moonriver.public.blastapi.io'],
webSocket: ['wss://moonriver.public.blastapi.io'],
},
},
blockExplorers: {
default: {
name: 'Moonscan',
url: 'https://moonriver.moonscan.io',
},
etherscan: {
name: 'Moonscan',
url: 'https://moonriver.moonscan.io',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 1597904,
},
},
testnet: false,
} as const satisfies Chain

0 comments on commit 51a5c32

Please sign in to comment.