Skip to content

Commit cff2aac

Browse files
HighGeckojxom
andauthored
feat: add IOTA, IOTA Testnet and CHIPS (#2608)
* Add IOTA, IOTA Testnet and CHIPS * Create grumpy-cows-speak.md * Add exports to index.ts & update API URL's * Update grumpy-cows-speak.md --------- Co-authored-by: jxom <[email protected]>
1 parent bf0fe9c commit cff2aac

File tree

5 files changed

+76
-0
lines changed

5 files changed

+76
-0
lines changed

.changeset/grumpy-cows-speak.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
Added IOTA, IOTA Testnet and CHIPS chains.

src/chains/definitions/chips.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineChain } from '../../utils/chain/defineChain.js'
2+
3+
export const chips = /*#__PURE__*/ defineChain({
4+
id: 2882,
5+
name: 'Chips Network',
6+
network: 'CHIPS',
7+
nativeCurrency: {
8+
decimals: 18,
9+
name: 'IOTA',
10+
symbol: 'IOTA',
11+
},
12+
rpcUrls: {
13+
default: {
14+
http: ['https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm'],
15+
},
16+
},
17+
})

src/chains/definitions/iota.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { defineChain } from '../../utils/chain/defineChain.js'
2+
3+
export const iota = /*#__PURE__*/ defineChain({
4+
id: 8822,
5+
name: 'IOTA EVM',
6+
network: 'iotaevm',
7+
nativeCurrency: {
8+
decimals: 18,
9+
name: 'IOTA',
10+
symbol: 'IOTA',
11+
},
12+
rpcUrls: {
13+
default: {
14+
http: ['https://json-rpc.evm.iotaledger.net'],
15+
webSocket: ['wss://ws.json-rpc.evm.iotaledger.net'],
16+
},
17+
},
18+
blockExplorers: {
19+
default: {
20+
name: 'Explorer',
21+
url: 'https://explorer.evm.iota.org',
22+
apiUrl: 'https://explorer.evm.iota.org/api',
23+
},
24+
},
25+
})

src/chains/definitions/iotaTestnet.ts

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineChain } from '../../utils/chain/defineChain.js'
2+
3+
export const iotaTestnet = /*#__PURE__*/ defineChain({
4+
id: 1075,
5+
name: 'IOTA EVM Testnet',
6+
network: 'iotaevm-testnet',
7+
nativeCurrency: {
8+
decimals: 18,
9+
name: 'IOTA',
10+
symbol: 'IOTA',
11+
},
12+
rpcUrls: {
13+
default: {
14+
http: ['https://json-rpc.evm.testnet.iotaledger.net'],
15+
webSocket: ['wss://ws.json-rpc.evm.testnet.iotaledger.net'],
16+
},
17+
},
18+
blockExplorers: {
19+
default: {
20+
name: 'Explorer',
21+
url: 'https://explorer.evm.testnet.iotaledger.net',
22+
apiUrl: 'https://explorer.evm.testnet.iotaledger.net/api',
23+
},
24+
},
25+
testnet: true,
26+
})

src/chains/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export { canto } from './definitions/canto.js'
5858
export { celo } from './definitions/celo.js'
5959
export { celoAlfajores } from './definitions/celoAlfajores.js'
6060
export { chiliz } from './definitions/chiliz.js'
61+
export { chips } from './definitions/chips.js'
6162
export { classic } from './definitions/classic.js'
6263
export { confluxESpace } from './definitions/confluxESpace.js'
6364
export { confluxESpaceTestnet } from './definitions/confluxESpaceTestnet.js'
@@ -136,6 +137,8 @@ export { holesky } from './definitions/holesky.js'
136137
export { immutableZkEvm } from './definitions/immutableZkEvm.js'
137138
export { immutableZkEvmTestnet } from './definitions/immutableZkEvmTestnet.js'
138139
export { inEVM } from './definitions/inEVM.js'
140+
export { iota } from './definitions/iota.js'
141+
export { iotaTestnet } from './definitions/iotaTestnet.js'
139142
export { kakarotSepolia } from './definitions/kakarotSepolia.js'
140143
export { kava } from './definitions/kava.js'
141144
export { kavaTestnet } from './definitions/kavaTestnet.js'

0 commit comments

Comments
 (0)