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 IoTeX (#32)
Browse files Browse the repository at this point in the history
* Added IoTeX chains

* Added changeset

* Fixed explorers and ChainIds
  • Loading branch information
simonerom authored Dec 23, 2022
1 parent 46e53fb commit a510b19
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-boats-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/chains': minor
---

Added IoTeX Chains.
2 changes: 2 additions & 0 deletions packages/chains/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ export { polygonMumbai } from './polygonMumbai'
export { sepolia } from './sepolia'
export { taraxa } from './taraxa'
export { taraxaTestnet } from './taraxaTestnet'
export { iotex } from './iotex'
export { iotexTestnet } from './iotexTestnet'
21 changes: 21 additions & 0 deletions packages/chains/src/iotex.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Chain } from './types'

export const iotex: Chain = {
id: 4689,
name: 'IoTeX',
network: 'iotex',
nativeCurrency: {
decimals: 18,
name: 'IoTeX',
symbol: 'IOTX',
},
rpcUrls: {
default: {
http: ['https://babel-api.mainnet.iotex.io'],
webSocket: ['wss://babel-api.mainnet.iotex.io'],
},
},
blockExplorers: {
default: { name: 'IoTeXScan', url: 'https://iotexscan.io' },
},
}
21 changes: 21 additions & 0 deletions packages/chains/src/iotexTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Chain } from './types'

export const iotexTestnet: Chain = {
id: 4690,
name: 'IoTeX Testnet',
network: 'iotex-testnet',
nativeCurrency: {
decimals: 18,
name: 'IoTeX',
symbol: 'IOTX',
},
rpcUrls: {
default: {
http: ['https://babel-api.testnet.iotex.io'],
webSocket: ['wss://babel-api.testnet.iotex.io'],
},
},
blockExplorers: {
default: { name: 'IoTeXScan', url: 'https://testnet.iotexscan.io' },
},
}

0 comments on commit a510b19

Please sign in to comment.