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

Commit

Permalink
feat: add linea support (#390)
Browse files Browse the repository at this point in the history
* feat: added linea support

* feat: add multicall info for linea mainnet

* feat: change etherscan explorer urls
  • Loading branch information
Akaryatrh authored Jul 24, 2023
1 parent e089d7d commit 414ff36
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 @@ -57,6 +57,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: 'Etherscan',
url: 'https://lineascan.build',
},
etherscan: {
name: 'Etherscan',
url: 'https://lineascan.build',
},
blockscout: {
name: 'Blockscout',
url: 'https://explorer.linea.build',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 42,
},
},
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/ws/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.build',
},
etherscan: {
name: 'Etherscan',
url: 'https://goerli.lineascan.build',
},
blockscout: {
name: 'Blockscout',
url: 'https://explorer.goerli.linea.build',
},
},
Expand Down

0 comments on commit 414ff36

Please sign in to comment.