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

Commit

Permalink
feat: added linea support
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaryatrh committed Jul 11, 2023
1 parent cf1b48d commit f8a2f72
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-lobsters-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/chains": patch
---

Added Linea support
1 change: 1 addition & 0 deletions packages/chains/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export { haqqMainnet } from './haqqMainnet'
export { haqqTestedge2 } from './haqqTestedge2'
export { klaytn } from './klaytn'
export { lineaTestnet } from './lineaTestnet'
export { linea } from './linea'
export { localhost } from './localhost'
export { mainnet } from './mainnet'
export { mantle } from './mantle'
Expand Down
43 changes: 43 additions & 0 deletions packages/chains/src/linea.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Chain } from './types'

export const linea = {
id: 59_144,
name: 'Linea Mainnet',
network: 'linea-mainnet',
nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
infura: {
http: ['https://linea-mainnet.infura.io/v3'],
webSocket: ['wss://linea-mainnet.infura.io/ws/v3'],
},
default: {
http: ['https://rpc.linea.build'],
webSocket: ['wss://rpc.linea.build'],
},
public: {
http: ['https://rpc.linea.build'],
webSocket: ['wss://rpc.linea.build'],
},
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://explorer.linea.build',
},
etherscan: {
name: 'Etherscan',
url: 'https://lineascan.io',
},
blockscout: {
name: 'Blockscout',
url: 'https://explorer.linea.build',
},
},
contracts: {
multicall3: {
address: '0x0',
blockCreated: 0,
},
},
testnet: false,
} as const satisfies Chain
14 changes: 11 additions & 3 deletions packages/chains/src/lineaTestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export const lineaTestnet = {
nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
infura: {
http: ['https://consensys-zkevm-goerli-prealpha.infura.io/v3'],
webSocket: ['wss://consensys-zkevm-goerli-prealpha.infura.io/ws/v3'],
http: ['https://linea-goerli.infura.io/v3'],
webSocket: ['wss://linea-goerli.infura.io/v3'],
},
default: {
http: ['https://rpc.goerli.linea.build'],
Expand All @@ -21,7 +21,15 @@ export const lineaTestnet = {
},
blockExplorers: {
default: {
name: 'BlockScout',
name: 'Etherscan',
url: 'https://goerli.lineascan.io',
},
etherscan: {
name: 'Etherscan',
url: 'https://goerli.lineascan.io',
},
blockscout: {
name: 'Blockscout',
url: 'https://explorer.goerli.linea.build',
},
},
Expand Down

0 comments on commit f8a2f72

Please sign in to comment.