Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adding l2ExplorerUrl value #226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/src/components/ConnectMetamaskButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const context = useContext();
const { address, isConnectPending, isReady, isMetamaskInstalled, connect, disconnect } = useWallet({
...context,
currentNetwork: computed(() => ({
explorerUrl: context.currentNetwork.value.rpcUrl,
explorerUrl: context.currentNetwork.value.l2ExplorerUrl ?? "",
chainName: context.currentNetwork.value.l2NetworkName,
l1ChainId: null as unknown as number,
...context.currentNetwork.value,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/composables/useContractInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default (context = useContext()) => {
currentNetwork: computed(() => {
return {
...context.currentNetwork.value,
explorerUrl: context.currentNetwork.value.rpcUrl,
explorerUrl: context.currentNetwork.value.l2ExplorerUrl ?? "",
chainName: context.currentNetwork.value.l2NetworkName,
l1ChainId: null as unknown as number,
};
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/configs/dev.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
"l2ExplorerUrl": "https://sepolia.explorer.zksync.io/",
"maintenance": false,
"name": "sepolia",
"published": true,
Expand Down Expand Up @@ -54,6 +55,7 @@
"l1ExplorerUrl": "https://etherscan.io",
"l2ChainId": 324,
"l2NetworkName": "zkSync Era Mainnet",
"l2ExplorerUrl": "https://explorer.zksync.io/",
"maintenance": false,
"name": "mainnet",
"published": true,
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type NetworkConfig = {
l2NetworkName: string;
l2ChainId: 270 | 300 | 324;
l1ExplorerUrl?: string;
l2ExplorerUrl?: string;
maintenance: boolean;
published: boolean;
hostnames: string[];
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/configs/production.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
"l2ExplorerUrl": "https://sepolia.explorer.zksync.io/",
"maintenance": false,
"name": "sepolia",
"published": true,
Expand All @@ -27,6 +28,7 @@
"l1ExplorerUrl": "https://etherscan.io",
"l2ChainId": 324,
"l2NetworkName": "zkSync Era Mainnet",
"l2ExplorerUrl": "https://explorer.zksync.io/",
"maintenance": false,
"name": "mainnet",
"published": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const context = useContext();
const { initialize: initializeWallet } = useWallet({
...context,
currentNetwork: computed(() => ({
explorerUrl: context.currentNetwork.value.rpcUrl,
explorerUrl: context.currentNetwork.value.l2ExplorerUrl ?? "",
chainName: context.currentNetwork.value.l2NetworkName,
l1ChainId: null as unknown as number,
...context.currentNetwork.value,
Expand Down