Skip to content

Commit 127124e

Browse files
authored
feat: add Injective network (#4011)
Co-authored-by: akitothemoon <akitothemoon@users.noreply.github.com>
1 parent ac6206b commit 127124e

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

.changeset/late-shoes-think.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
Added Injective network.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { defineChain } from '../../utils/chain/defineChain.js'
2+
3+
export const injective = /*#__PURE__*/ defineChain({
4+
id: 1776,
5+
name: 'Injective',
6+
nativeCurrency: {
7+
decimals: 18,
8+
name: 'Injective',
9+
symbol: 'INJ',
10+
},
11+
rpcUrls: {
12+
default: {
13+
http: ['https://sentry.evm-rpc.injective.network'],
14+
webSocket: ['wss://sentry.evm-ws.injective.network'],
15+
},
16+
},
17+
blockExplorers: {
18+
default: {
19+
name: 'Injective Explorer',
20+
url: 'https://blockscout.injective.network',
21+
apiUrl: 'https://blockscout.injective.network/api',
22+
},
23+
},
24+
testnet: false,
25+
})
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { defineChain } from '../../utils/chain/defineChain.js'
2+
3+
export const injectiveTestnet = /*#__PURE__*/ defineChain({
4+
id: 1439,
5+
name: 'Injective Testnet',
6+
nativeCurrency: {
7+
decimals: 18,
8+
name: 'Injective',
9+
symbol: 'INJ',
10+
},
11+
rpcUrls: {
12+
default: {
13+
http: ['https://k8s.testnet.json-rpc.injective.network'],
14+
webSocket: ['wss://k8s.testnet.ws.injective.network'],
15+
},
16+
},
17+
blockExplorers: {
18+
default: {
19+
name: 'Injective Explorer',
20+
url: 'https://testnet.blockscout.injective.network',
21+
apiUrl: 'https://testnet.blockscout.injective.network/api',
22+
},
23+
},
24+
testnet: true,
25+
})

src/chains/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ export { immutableZkEvmTestnet } from './definitions/immutableZkEvmTestnet.js'
272272
export { inEVM } from './definitions/inEVM.js'
273273
export { initVerse } from './definitions/initVerse.js'
274274
export { initVerseGenesis } from './definitions/initVerseGenesis.js'
275+
export { injective } from './definitions/injective.js'
276+
export { injectiveTestnet } from './definitions/injectiveTestnet.js'
275277
export { ink } from './definitions/ink.js'
276278
export { inkSepolia } from './definitions/inkSepolia.js'
277279
export { iota } from './definitions/iota.js'

0 commit comments

Comments
 (0)