-
-
Notifications
You must be signed in to change notification settings - Fork 927
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zksync): add zksync local hyperchain networks (#3081)
- Loading branch information
1 parent
acc496a
commit 0d9dfcd
Showing
7 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"viem": minor | ||
--- | ||
|
||
Added `ZKsync` local hyperchain networks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { defineChain } from '../../utils/chain/defineChain.js' | ||
import { chainConfig } from '../../zksync/chainConfig.js' | ||
|
||
// The local hyperchain setup: https://github.com/matter-labs/local-setup/blob/main/zk-chains-docker-compose.yml | ||
|
||
export const zksyncLocalCustomHyperchain = /*#__PURE__*/ defineChain({ | ||
...chainConfig, | ||
id: 272, | ||
name: 'ZKsync CLI Local Custom Hyperchain', | ||
nativeCurrency: { name: 'BAT', symbol: 'BAT', decimals: 18 }, | ||
rpcUrls: { | ||
default: { | ||
http: ['http://localhost:15200'], | ||
webSocket: ['ws://localhost:15201'], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: 'ZKsync explorer', | ||
url: 'http://localhost:15005/', | ||
apiUrl: 'http://localhost:15005/api', | ||
}, | ||
}, | ||
testnet: true, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { defineChain } from '../../utils/chain/defineChain.js' | ||
import { chainConfig } from '../../zksync/chainConfig.js' | ||
|
||
// The local hyperchain setup: https://github.com/matter-labs/local-setup/blob/main/zk-chains-docker-compose.yml | ||
|
||
export const zksyncLocalHyperchain = /*#__PURE__*/ defineChain({ | ||
...chainConfig, | ||
id: 270, | ||
name: 'ZKsync CLI Local Hyperchain', | ||
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, | ||
rpcUrls: { | ||
default: { | ||
http: ['http://localhost:15100'], | ||
webSocket: ['ws://localhost:15101'], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: 'ZKsync explorer', | ||
url: 'http://localhost:15005/', | ||
apiUrl: 'http://localhost:15005/api', | ||
}, | ||
}, | ||
testnet: true, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { defineChain } from '../../utils/chain/defineChain.js' | ||
|
||
// The local hyperchain setup: https://github.com/matter-labs/local-setup/blob/main/zk-chains-docker-compose.yml | ||
|
||
export const zksyncLocalHyperchainL1 = /*#__PURE__*/ defineChain({ | ||
id: 9, | ||
name: 'ZKsync CLI Local Hyperchain L1', | ||
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, | ||
rpcUrls: { | ||
default: { | ||
http: ['http://localhost:15045'], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: 'Blockscout', | ||
url: 'http://localhost:15001/', | ||
apiUrl: 'http://localhost:15001/api/v2', | ||
}, | ||
}, | ||
testnet: true, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// biome-ignore lint/performance/noBarrelFile: entrypoint module | ||
export { zksync } from '../chains/definitions/zksync.js' | ||
export { zksyncInMemoryNode } from '../chains/definitions/zksyncInMemoryNode.js' | ||
export { zksyncLocalCustomHyperchain } from '../chains/definitions/zksyncLocalCustomHyperchain.js' | ||
export { zksyncLocalHyperchain } from '../chains/definitions/zksyncLocalHyperchain.js' | ||
export { zksyncLocalHyperchainL1 } from '../chains/definitions/zksyncLocalHyperchainL1.js' | ||
export { zksyncLocalNode } from '../chains/definitions/zksyncLocalNode.js' | ||
export { zksyncSepoliaTestnet } from '../chains/definitions/zksyncSepoliaTestnet.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters