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

Commit

Permalink
feat(chains): added Flare Chain Networks: Flare, Coston2, Songbird, C…
Browse files Browse the repository at this point in the history
…oston (#138)

* Add Flare Chain Networks

* Fixes Changes

* Update flare.ts

* Update flareTestnet.ts

* Update songbird.ts

* Update songbirdTestnet.ts

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
  • Loading branch information
Uttam-Singhh and jxom authored Mar 7, 2023
1 parent 25eda6b commit 48f9a47
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-cows-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/chains': major
---

Added Flare Mainnet, Testnet and Songbird Mainnet, Testnet support
22 changes: 22 additions & 0 deletions packages/chains/src/flare.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Chain } from './types'

export const flare: Chain = {
id: 14,
name: 'Flare Mainnet',
network: 'flare-mainnet',
nativeCurrency: {
decimals: 18,
name: 'flare',
symbol: 'FLR',
},
rpcUrls: {
default: { http: ['https://flare-api.flare.network/ext/C/rpc'] },
public: { http: ['https://flare-api.flare.network/ext/C/rpc'] },
},
blockExplorers: {
default: {
name: 'Flare Explorer',
url: 'https://flare-explorer.flare.network',
},
},
}
23 changes: 23 additions & 0 deletions packages/chains/src/flareTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Chain } from './types'

export const flareTestnet: Chain = {
id: 114,
name: 'Coston2',
network: 'coston2',
nativeCurrency: {
decimals: 18,
name: 'coston2flare',
symbol: 'C2FLR',
},
rpcUrls: {
default: { http: ['https://coston2-api.flare.network/ext/C/rpc'] },
public: { http: ['https://coston2-api.flare.network/ext/C/rpc'] },
},
blockExplorers: {
default: {
name: 'Coston2 Explorer',
url: 'https://coston2-explorer.flare.network',
},
},
testnet: true,
}
4 changes: 4 additions & 0 deletions packages/chains/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export { fantomTestnet } from './fantomTestnet'
export { filecoin } from './filecoin'
export { filecoinCalibration } from './filecoinCalibration'
export { filecoinHyperspace } from './filecoinHyperspace'
export { flare } from './flare'
export { flareTestnet } from './flareTestnet'
export { foundry } from './foundry'
export { iotex } from './iotex'
export { iotexTestnet } from './iotexTestnet'
Expand All @@ -45,6 +47,8 @@ export { polygon } from './polygon'
export { polygonMumbai } from './polygonMumbai'
export { polygonZkEvmTestnet } from './polygonZkEvmTestnet'
export { sepolia } from './sepolia'
export { songbird } from './songbird'
export { songbirdTestnet } from './songbirdTestnet'
export { shardeumSphinx } from './shardeumSphinx'
export { taraxa } from './taraxa'
export { taraxaTestnet } from './taraxaTestnet'
Expand Down
22 changes: 22 additions & 0 deletions packages/chains/src/songbird.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Chain } from './types'

export const songbird: Chain = {
id: 19,
name: 'Songbird Mainnet',
network: 'songbird-mainnet',
nativeCurrency: {
decimals: 18,
name: 'songbird',
symbol: 'SGB',
},
rpcUrls: {
default: { http: ['https://songbird-api.flare.network/ext/C/rpc'] },
public: { http: ['https://songbird-api.flare.network/ext/C/rpc'] },
},
blockExplorers: {
default: {
name: 'Songbird Explorer',
url: 'https://songbird-explorer.flare.network',
},
},
}
23 changes: 23 additions & 0 deletions packages/chains/src/songbirdTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Chain } from './types'

export const songbirdTestnet: Chain = {
id: 16,
name: 'Coston',
network: 'coston',
nativeCurrency: {
decimals: 18,
name: 'costonflare',
symbol: 'CFLR',
},
rpcUrls: {
default: { http: ['https://coston-api.flare.network/ext/C/rpc'] },
public: { http: ['https://coston-api.flare.network/ext/C/rpc'] },
},
blockExplorers: {
default: {
name: 'Coston Explorer',
url: 'https://coston-explorer.flare.network',
},
},
testnet: true,
}

0 comments on commit 48f9a47

Please sign in to comment.