diff --git a/.dockerignore b/.dockerignore
index 20b25939ec..f05f8a34ae 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1 +1,2 @@
-**/dist/
\ No newline at end of file
+**/dist/
+**.env
\ No newline at end of file
diff --git a/README.md b/README.md
index 3cdd7e3dd5..72ef1ab58b 100644
--- a/README.md
+++ b/README.md
@@ -96,7 +96,7 @@ Each component can also be started individually. Follow individual packages `REA
## 🐳 Running in Docker
There is a docker compose configuration that allows you to run Block Explorer and all its dependencies in docker. Just run the following command to spin up the whole environment:
```
-docker-compose up
+docker compose up
```
It will run local Ethereum node, ZkSync Era, Postgres DB and all Block Explorer services.
diff --git a/docker-compose-cli.yaml b/docker-compose-cli.yaml
index c01ce5d059..a8f29e8478 100644
--- a/docker-compose-cli.yaml
+++ b/docker-compose-cli.yaml
@@ -1,6 +1,3 @@
-version: "3.2"
-name: "zkcli-block-explorer"
-
services:
app:
platform: linux/amd64
@@ -26,6 +23,8 @@ services:
- DATA_FETCHER_URL=http://data-fetcher:3040
- BATCHES_PROCESSING_POLLING_INTERVAL=1000
restart: unless-stopped
+ extra_hosts:
+ - "host.docker.internal:host-gateway"
data-fetcher:
platform: linux/amd64
@@ -38,6 +37,8 @@ services:
ports:
- '3040:3040'
restart: unless-stopped
+ extra_hosts:
+ - "host.docker.internal:host-gateway"
api:
platform: linux/amd64
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 1020cc35bc..55e1999cbf 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,16 +1,10 @@
-name: block-explorer
services:
app:
build:
context: .
dockerfile: ./packages/app/Dockerfile
- target: development-stage
- command: npm run --prefix packages/app dev -- --host
ports:
- '3010:3010'
- volumes:
- - ./packages/app:/usr/src/app/packages/app
- - /usr/src/app/packages/app/node_modules
depends_on:
- api
restart: unless-stopped
@@ -19,12 +13,9 @@ services:
build:
context: .
dockerfile: ./packages/worker/Dockerfile
- target: development-stage
- command: npm run --prefix packages/worker dev:debug
environment:
- PORT=3001
- LOG_LEVEL=verbose
- - NODE_ENV=development
- DATABASE_HOST=postgres
- DATABASE_USER=postgres
- DATABASE_PASSWORD=postgres
@@ -34,11 +25,6 @@ services:
- BATCHES_PROCESSING_POLLING_INTERVAL=1000
ports:
- '3001:3001'
- - '9229:9229'
- - '9230:9230'
- volumes:
- - ./packages/worker:/usr/src/app/packages/worker
- - /usr/src/app/packages/worker/node_modules
depends_on:
zksync:
condition: service_healthy
@@ -48,20 +34,12 @@ services:
build:
context: .
dockerfile: ./packages/data-fetcher/Dockerfile
- target: development-stage
- command: npm run --prefix packages/data-fetcher dev:debug
environment:
- PORT=3040
- LOG_LEVEL=verbose
- - NODE_ENV=development
- BLOCKCHAIN_RPC_URL=http://zksync:3050
ports:
- '3040:3040'
- - '9231:9229'
- - '9232:9230'
- volumes:
- - ./packages/data-fetcher:/usr/src/app/packages/data-fetcher
- - /usr/src/app/packages/data-fetcher/node_modules
depends_on:
zksync:
condition: service_healthy
@@ -71,22 +49,14 @@ services:
build:
context: .
dockerfile: ./packages/api/Dockerfile
- target: development-stage
- command: npm run --prefix packages/api dev:debug
environment:
- PORT=3020
- METRICS_PORT=3005
- LOG_LEVEL=verbose
- - NODE_ENV=development
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/block-explorer
ports:
- '3020:3020'
- '3005:3005'
- - '9233:9229'
- - '9234:9230'
- volumes:
- - ./packages/api:/usr/src/app/packages/api
- - /usr/src/app/packages/api/node_modules
depends_on:
- worker
restart: unless-stopped
@@ -143,7 +113,7 @@ services:
test: "curl -H \"Content-Type: application/json\" -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":67}' 127.0.0.1:3050 || exit 1"
interval: 5s
timeout: 5s
- retries: 120
+ retries: 300
restart: unless-stopped
volumes:
diff --git a/packages/app/README.md b/packages/app/README.md
index ab191f5bb0..692aeb3de6 100644
--- a/packages/app/README.md
+++ b/packages/app/README.md
@@ -46,7 +46,6 @@ const config: EnvironmentConfig = {
icon: "/images/icons/zksync-arrows.svg",
l2ChainId: 270,
l2NetworkName: "Local",
- l2WalletUrl: "https://goerli.staging-portal.zksync.dev/",
maintenance: false,
name: "local",
published: true,
@@ -60,7 +59,6 @@ const config: EnvironmentConfig = {
icon: "/images/icons/zksync-arrows.svg",
l2ChainId: 270,
l2NetworkName: "Local Hyperchain",
- l2WalletUrl: "https://goerli.staging-portal.zksync.dev/",
maintenance: false,
name: "local-hyperchain",
published: true,
diff --git a/packages/app/src/components/common/CheckBoxInput.stories.ts b/packages/app/src/components/common/CheckBoxInput.stories.ts
new file mode 100644
index 0000000000..6f1d6a20fc
--- /dev/null
+++ b/packages/app/src/components/common/CheckBoxInput.stories.ts
@@ -0,0 +1,29 @@
+import CheckBoxInput from "./CheckBoxInput.vue";
+
+export default {
+ title: "Common/CheckBoxInput",
+ component: CheckBoxInput,
+};
+
+type Args = {
+ modelValue: boolean;
+};
+
+const Template = (args: Args) => ({
+ components: { CheckBoxInput },
+ setup() {
+ return { args };
+ },
+ template: `
+ CheckBox Input`,
+});
+
+export const Checked = Template.bind({}) as unknown as { args: Args };
+Checked.args = {
+ modelValue: true,
+};
+
+export const Unchecked = Template.bind({}) as unknown as { args: Args };
+Unchecked.args = {
+ modelValue: false,
+};
diff --git a/packages/app/src/components/common/CheckBoxInput.vue b/packages/app/src/components/common/CheckBoxInput.vue
new file mode 100644
index 0000000000..04f1de75b6
--- /dev/null
+++ b/packages/app/src/components/common/CheckBoxInput.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
diff --git a/packages/app/src/components/form/FormItem.vue b/packages/app/src/components/form/FormItem.vue
index 8e179ae1be..f5a72f24e3 100644
--- a/packages/app/src/components/form/FormItem.vue
+++ b/packages/app/src/components/form/FormItem.vue
@@ -42,7 +42,7 @@ defineProps({
}
.label-inline-block {
.form-item-label {
- @apply inline-block;
+ @apply float-left;
}
}
diff --git a/packages/app/src/components/header/TheHeader.vue b/packages/app/src/components/header/TheHeader.vue
index 2c7ca32a8e..dd75815f1d 100644
--- a/packages/app/src/components/header/TheHeader.vue
+++ b/packages/app/src/components/header/TheHeader.vue
@@ -191,10 +191,6 @@ const links = [
label: computed(() => t("header.nav.contractVerification")),
to: { name: "contract-verification" },
},
- {
- label: computed(() => t("header.nav.portal")),
- url: computed(() => currentNetwork.value.l2WalletUrl),
- },
];
if (currentNetwork.value.bridgeUrl) {
diff --git a/packages/app/src/components/transactions/infoTable/GeneralInfo.vue b/packages/app/src/components/transactions/infoTable/GeneralInfo.vue
index f1b554ed4a..40fbb238d6 100644
--- a/packages/app/src/components/transactions/infoTable/GeneralInfo.vue
+++ b/packages/app/src/components/transactions/infoTable/GeneralInfo.vue
@@ -30,7 +30,7 @@
/>
-
+
{{ t("transactions.table.reason") }}
diff --git a/packages/app/src/composables/useRuntimeConfig.ts b/packages/app/src/composables/useRuntimeConfig.ts
index b0a053ee8e..0e7e6dc32c 100644
--- a/packages/app/src/composables/useRuntimeConfig.ts
+++ b/packages/app/src/composables/useRuntimeConfig.ts
@@ -3,13 +3,12 @@ import type { NetworkConfig, RuntimeConfig } from "@/configs";
export const DEFAULT_NETWORK: NetworkConfig = {
apiUrl: "https://block-explorer-api.testnets.zksync.dev",
verificationApiUrl: "https://zksync2-testnet-explorer.zksync.dev",
- bridgeUrl: "https://goerli.bridge.zksync.io",
+ bridgeUrl: "https://portal.zksync.io/bridge/?network=goerli",
hostnames: ["https://goerli.explorer.zksync.io"],
icon: "/images/icons/zksync-arrows.svg",
l1ExplorerUrl: "https://goerli.etherscan.io",
l2ChainId: 280,
l2NetworkName: "zkSync Era Goerli Testnet",
- l2WalletUrl: "https://goerli.portal.zksync.io/",
maintenance: false,
name: "goerli",
published: true,
diff --git a/packages/app/src/configs/dev.config.json b/packages/app/src/configs/dev.config.json
index 07de06fbd1..ceca3f98f7 100644
--- a/packages/app/src/configs/dev.config.json
+++ b/packages/app/src/configs/dev.config.json
@@ -9,7 +9,6 @@
"icon": "/images/icons/zksync-arrows.svg",
"l2ChainId": 270,
"l2NetworkName": "Local",
- "l2WalletUrl": "http://localhost:3000",
"maintenance": false,
"name": "local",
"published": true,
@@ -18,7 +17,7 @@
{
"apiUrl": "https://block-explorer-api.testnets.zksync.dev",
"verificationApiUrl": "https://zksync2-testnet-explorer.zksync.dev",
- "bridgeUrl": "https://staging.goerli.bridge.zksync.dev",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=goerli",
"hostnames": [
"https://goerli.staging-scan-v2.zksync.dev"
],
@@ -26,7 +25,6 @@
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 280,
"l2NetworkName": "zkSync Era Goerli Testnet",
- "l2WalletUrl": "https://goerli.staging-portal.zksync.dev/",
"maintenance": false,
"name": "goerli",
"published": true,
@@ -35,13 +33,12 @@
{
"apiUrl": "https://block-explorer-api.sepolia.zksync.dev",
"verificationApiUrl": "https://explorer.sepolia.era.zksync.dev",
- "bridgeUrl": "https://staging.goerli.bridge.zksync.dev",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=sepolia",
"hostnames": [],
"icon": "/images/icons/zksync-arrows.svg",
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
- "l2WalletUrl": "https://staging-portal.zksync.dev/?network=era-boojnet",
"maintenance": false,
"name": "sepolia",
"published": true,
@@ -57,7 +54,6 @@
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 270,
"l2NetworkName": "Goerli (Stage2)",
- "l2WalletUrl": "https://goerli-beta.staging-portal.zksync.dev/",
"maintenance": false,
"name": "goerli-beta",
"published": true,
@@ -66,7 +62,7 @@
{
"apiUrl": "https://block-explorer-api.mainnet.zksync.io",
"verificationApiUrl": "https://zksync2-mainnet-explorer.zksync.io",
- "bridgeUrl": "https://staging.bridge.zksync.dev",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=mainnet",
"hostnames": [
"https://staging-scan-v2.zksync.dev"
],
@@ -74,7 +70,6 @@
"l1ExplorerUrl": "https://etherscan.io",
"l2ChainId": 324,
"l2NetworkName": "zkSync Era Mainnet",
- "l2WalletUrl": "https://staging-portal.zksync.dev/",
"maintenance": false,
"name": "mainnet",
"published": true,
diff --git a/packages/app/src/configs/index.ts b/packages/app/src/configs/index.ts
index edee2ceeae..22b59f9657 100644
--- a/packages/app/src/configs/index.ts
+++ b/packages/app/src/configs/index.ts
@@ -6,7 +6,6 @@ export type NetworkConfig = {
rpcUrl: string;
bridgeUrl?: string;
l2NetworkName: string;
- l2WalletUrl: string;
l2ChainId: 270 | 280 | 324;
l1ExplorerUrl?: string;
maintenance: boolean;
diff --git a/packages/app/src/configs/local.config.json b/packages/app/src/configs/local.config.json
index afd0e82298..cbaee29f8a 100644
--- a/packages/app/src/configs/local.config.json
+++ b/packages/app/src/configs/local.config.json
@@ -9,7 +9,6 @@
"icon": "/images/icons/zksync-arrows.svg",
"l2ChainId": 270,
"l2NetworkName": "Local",
- "l2WalletUrl": "http://localhost:3000",
"maintenance": false,
"name": "local",
"published": true,
diff --git a/packages/app/src/configs/production.config.json b/packages/app/src/configs/production.config.json
index d2a5f9eab7..066884be9c 100644
--- a/packages/app/src/configs/production.config.json
+++ b/packages/app/src/configs/production.config.json
@@ -3,7 +3,7 @@
{
"apiUrl": "https://block-explorer-api.testnets.zksync.dev",
"verificationApiUrl": "https://zksync2-testnet-explorer.zksync.dev",
- "bridgeUrl": "https://goerli.bridge.zksync.io",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=goerli",
"hostnames": [
"https://goerli.explorer.zksync.io"
],
@@ -11,7 +11,6 @@
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 280,
"l2NetworkName": "zkSync Era Goerli Testnet",
- "l2WalletUrl": "https://goerli.portal.zksync.io/",
"maintenance": false,
"name": "goerli",
"published": true,
@@ -20,7 +19,7 @@
{
"apiUrl": "https://block-explorer-api.sepolia.zksync.dev",
"verificationApiUrl": "https://explorer.sepolia.era.zksync.dev",
- "bridgeUrl": "https://bridge.zksync.io",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=sepolia",
"hostnames": [
"https://sepolia.explorer.zksync.io"
],
@@ -28,7 +27,6 @@
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
- "l2WalletUrl": "https://portal.zksync.io/",
"maintenance": false,
"name": "sepolia",
"published": true,
@@ -37,7 +35,7 @@
{
"apiUrl": "https://block-explorer-api.mainnet.zksync.io",
"verificationApiUrl": "https://zksync2-mainnet-explorer.zksync.io",
- "bridgeUrl": "https://bridge.zksync.io",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=mainnet",
"hostnames": [
"https://explorer.zksync.io"
],
@@ -45,7 +43,6 @@
"l1ExplorerUrl": "https://etherscan.io",
"l2ChainId": 324,
"l2NetworkName": "zkSync Era Mainnet",
- "l2WalletUrl": "https://portal.zksync.io/",
"maintenance": false,
"name": "mainnet",
"published": true,
diff --git a/packages/app/src/configs/staging.config.json b/packages/app/src/configs/staging.config.json
index fe9e8d4c27..fd3818f4b2 100644
--- a/packages/app/src/configs/staging.config.json
+++ b/packages/app/src/configs/staging.config.json
@@ -3,7 +3,7 @@
{
"apiUrl": "https://block-explorer-api.testnets.zksync.dev",
"verificationApiUrl": "https://zksync2-testnet-explorer.zksync.dev",
- "bridgeUrl": "https://staging.goerli.bridge.zksync.dev",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=goerli",
"hostnames": [
"https://goerli.staging-scan-v2.zksync.dev"
],
@@ -11,7 +11,6 @@
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 280,
"l2NetworkName": "zkSync Era Goerli Testnet",
- "l2WalletUrl": "https://goerli.staging-portal.zksync.dev/",
"maintenance": false,
"name": "goerli",
"published": true,
@@ -20,7 +19,7 @@
{
"apiUrl": "https://block-explorer-api.sepolia.zksync.dev",
"verificationApiUrl": "https://explorer.sepolia.era.zksync.dev",
- "bridgeUrl": "https://staging.goerli.bridge.zksync.dev",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=sepolia",
"hostnames": [
"https://sepolia.staging-scan-v2.zksync.dev"
],
@@ -28,7 +27,6 @@
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
- "l2WalletUrl": "https://staging-portal.zksync.dev/?network=era-boojnet",
"maintenance": false,
"name": "sepolia",
"published": true,
@@ -44,7 +42,6 @@
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 270,
"l2NetworkName": "Goerli (Stage2)",
- "l2WalletUrl": "https://goerli-beta.staging-portal.zksync.dev/",
"maintenance": false,
"name": "goerli-beta",
"published": true,
@@ -53,7 +50,7 @@
{
"apiUrl": "https://block-explorer-api.mainnet.zksync.io",
"verificationApiUrl": "https://zksync2-mainnet-explorer.zksync.io",
- "bridgeUrl": "https://staging.bridge.zksync.dev",
+ "bridgeUrl": "https://portal.zksync.io/bridge/?network=mainnet",
"hostnames": [
"https://staging-scan-v2.zksync.dev"
],
@@ -61,7 +58,6 @@
"l1ExplorerUrl": "https://etherscan.io",
"l2ChainId": 324,
"l2NetworkName": "zkSync Era Mainnet",
- "l2WalletUrl": "https://staging-portal.zksync.dev/",
"maintenance": false,
"name": "mainnet",
"published": true,
diff --git a/packages/app/src/locales/en.json b/packages/app/src/locales/en.json
index 662856dcc6..e4b231daf5 100644
--- a/packages/app/src/locales/en.json
+++ b/packages/app/src/locales/en.json
@@ -281,7 +281,6 @@
"header": {
"nav": {
"blockExplorer": "Block Explorer",
- "portal": "Portal",
"documentation": "Documentation",
"tools": "Tools",
"apiDocs": "API Documentation",
@@ -458,7 +457,8 @@
"validation": {
"required": "Solc version is required"
},
- "error": "Unable to get list of supported Solc versions"
+ "error": "Unable to get list of supported Solc versions",
+ "zkVM": "zkVM"
},
"zksolcVersion": {
"label": "Zksolc Version",
diff --git a/packages/app/src/locales/uk.json b/packages/app/src/locales/uk.json
index b37af6f27c..c8b946f0fa 100644
--- a/packages/app/src/locales/uk.json
+++ b/packages/app/src/locales/uk.json
@@ -152,7 +152,6 @@
"contractVerification": "Верифікація Смарт контракту",
"debugger": "zkEVM Налагоджувач",
"blockExplorer": "Провідник",
- "portal": "Портал",
"documentation": "Документація"
}
},
diff --git a/packages/app/src/views/ContractVerificationView.vue b/packages/app/src/views/ContractVerificationView.vue
index 0e7e8bd339..2bc9272bfa 100644
--- a/packages/app/src/views/ContractVerificationView.vue
+++ b/packages/app/src/views/ContractVerificationView.vue
@@ -90,6 +90,7 @@
>{{ t(`contractVerification.form.${selectedZkCompiler.name}Version.details`) }}
-
+
+ {{ t("contractVerification.form.solcVersion.zkVM") }}
[
},
]);
+const isZkVMSolcCompiler = ref(false);
const selectedCompilationType = ref(CompilationTypeOptionsEnum.soliditySingleFile);
const isSingleFile = computed(() =>
[CompilationTypeOptionsEnum.soliditySingleFile, CompilationTypeOptionsEnum.vyperSingleFile].includes(
@@ -350,7 +365,16 @@ const selectedZkCompiler = computed(() => {
});
const selectedCompiler = computed(() => {
const compiler = compilerTypeMap[selectedCompilationType.value].compiler;
- return compilerVersions.value[compiler];
+ const compilerInfo = compilerVersions.value[compiler];
+ if (compiler === CompilerEnum.solc) {
+ return {
+ ...compilerInfo,
+ versions: compilerInfo.versions?.filter((version) =>
+ isZkVMSolcCompiler.value ? version.startsWith(zkVMVersionPrefix) : !version.startsWith(zkVMVersionPrefix)
+ ),
+ };
+ }
+ return compilerInfo;
});
const selectedZkCompilerVersion = ref(
selectedZkCompiler.value.versions[selectedZkCompiler.value.versions.length - 1] || ""
@@ -496,6 +520,10 @@ const v$ = useVuelidate(
form
);
+function onZkVMSelectionChanged() {
+ selectedCompilerVersion.value = selectedCompiler.value.versions[0] || "";
+}
+
function onCompilationTypeChange() {
selectedZkCompilerVersion.value = selectedZkCompiler.value.versions[0] || "";
selectedCompilerVersion.value = selectedCompiler.value.versions[0] || "";
diff --git a/packages/app/tests/components/TheHeader.spec.ts b/packages/app/tests/components/TheHeader.spec.ts
index c409a6cfd1..a5367a5832 100644
--- a/packages/app/tests/components/TheHeader.spec.ts
+++ b/packages/app/tests/components/TheHeader.spec.ts
@@ -23,7 +23,6 @@ vi.mock("@/composables/useContext", () => {
default: () => ({
currentNetwork: computed(() => ({
maintenance: maintenanceMock(),
- l2WalletUrl: "https://portal.zksync.io/",
bridgeUrl: "https://bridge.zksync.io/",
apiUrl: "https://api-url",
})),
@@ -60,7 +59,7 @@ describe("TheHeader:", () => {
const toolsLinks = dropdown[1].findAll("a");
expect(toolsLinks[0].attributes("href")).toBe("https://api-url/docs");
expect(toolsLinksRouter[0].props().to.name).toBe("contract-verification");
- expect(toolsLinks[2].attributes("href")).toBe("https://portal.zksync.io/");
+ expect(toolsLinks[2].attributes("href")).toBe("https://bridge.zksync.io/");
expect(wrapper.findAll(".navigation-container > .navigation-link")[0].attributes("href")).toBe(
"https://docs.zksync.io/build/tooling/block-explorer/getting-started.html"
diff --git a/packages/app/tests/components/common/CheckBoxInput.spec.ts b/packages/app/tests/components/common/CheckBoxInput.spec.ts
new file mode 100644
index 0000000000..f51e052269
--- /dev/null
+++ b/packages/app/tests/components/common/CheckBoxInput.spec.ts
@@ -0,0 +1,39 @@
+import { describe, expect, it } from "vitest";
+
+import { render } from "@testing-library/vue";
+
+import CheckBoxInput from "@/components/common/CheckBoxInput.vue";
+
+describe("CheckBoxInput", () => {
+ it("renders default slot", () => {
+ const { container } = render(CheckBoxInput, {
+ slots: {
+ default: {
+ template: "CheckBox Input",
+ },
+ },
+ props: {
+ modelValue: true,
+ },
+ });
+ expect(container.textContent).toBe("CheckBox Input");
+ });
+ it("renders checked state correctly", async () => {
+ const { container } = render(CheckBoxInput, {
+ props: {
+ modelValue: true,
+ },
+ });
+ expect(container.querySelector(".checkbox-input-container")!.classList.contains("checked")).toBe(true);
+ expect(container.querySelector(".checkbox-input-container input")?.checked).toBe(true);
+ });
+ it("renders unchecked state correctly", async () => {
+ const { container } = render(CheckBoxInput, {
+ props: {
+ modelValue: false,
+ },
+ });
+ expect(container.querySelector(".checkbox-input-container")!.classList.contains("checked")).toBe(false);
+ expect(container.querySelector(".checkbox-input-container input")?.checked).toBe(false);
+ });
+});
diff --git a/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature b/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature
index 4b1cb560f2..f985c01e6b 100644
--- a/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature
+++ b/packages/app/tests/e2e/features/artifacts/artifactsSet1.feature
@@ -4,53 +4,30 @@ Feature: Main Page
Background:
Given I am on main page
- @id253 @featureEnv @testnet
- Scenario Outline: Check the element "" in Tools section is available, clickable and have correct href
- Given I click by text "Tools"
- Given Element with "text" "" should be "visible"
- When Element with "text" "" should be "clickable"
- Then Element with "text" "" should have "" value
-
- Examples:
- | Sub-Section | url |
- | Smart Contract Verification | /contracts/verify |
- | Portal | https://goerli.staging-portal.zksync.dev/ |
-
- @id253 @featureEnv @mainnet
- Scenario Outline: Check the element "" in Tools section is available, clickable and have correct href
- Given I click by text "Tools"
- Given Element with "text" "" should be "visible"
- When Element with "text" "" should be "clickable"
- Then Element with "text" "" should have "" value
- Examples:
- | Sub-Section | url |
- | Smart Contract Verification | /contracts/verify |
- | Portal | https://staging-portal.zksync.dev/ |
-
- @id253:I @productionEnv @testnet
- Scenario Outline: Check the element "" in Tools section is available, clickable and have correct href
+ @id253:I @featureEnv @testnetSmokeSuite @testnet
+ Scenario Outline: Check the element "" in Tools section is available, clickable and have correct href (Sepolia)
Given I click by text "Tools"
Given Element with "text" "" should be "visible"
When Element with "text" "" should be "clickable"
Then Element with "text" "" should have "" value
Examples:
- | Sub-Section | url |
- | Smart Contract Verification | /contracts/verify |
- | Portal | https://goerli.portal.zksync.io/ |
+ | Sub-Section | url |
+ | Smart Contract Verification | /contracts/verify |
+ | Bridge | https://portal.zksync.io/bridge/?network=sepolia |
- @id253:I @productionEnv @mainnet
- Scenario Outline: Check the element "" in Tools section is available, clickable and have correct href
+ @id253:II @mainnet
+ Scenario Outline: Check the element "" in Tools section is available, clickable and have correct href (Mainnet)
Given I click by text "Tools"
Given Element with "text" "" should be "visible"
When Element with "text" "" should be "clickable"
Then Element with "text" "" should have "" value
Examples:
- | Sub-Section | url |
- | Smart Contract Verification | /contracts/verify |
- | Portal | https://portal.zksync.io/ |
+ | Sub-Section | url |
+ | Smart Contract Verification | /contracts/verify |
+ | Bridge | https://portal.zksync.io/bridge/?network=mainnet |
@id231
Scenario Outline: Check social networks icon "" is available, clickable and have correct href
@@ -85,7 +62,7 @@ Feature: Main Page
| zkSync Era Sepolia Testnet | network |
| zkSync Era Goerli Testnet | network |
| Goerli (Stage2) | network |
-
+
@id254:II @productionEnv
Scenario Outline: Check dropdown "" for "" and verify
Given Set the "" value for "" switcher
@@ -139,7 +116,7 @@ Feature: Main Page
Given I go to page "/address/0x8f0F33583a56908F7F933cd6F0AaE382aC3fd8f6"
Then Element with "id" "search" should be "visible"
- @id209:I @testnet
+ @id209:I @testnet
Scenario Outline: Verify Transaction table contains "" row
Given I go to page "/tx/0xe7a91cc9b270d062328ef995e0ef67195a3703d43ce4e1d375f87d5c64e51981"
When Table contains row with ""
@@ -201,7 +178,7 @@ Feature: Main Page
| Created | 2023-05-14 |
- @id211 @testnet
+ @id211 @testnet
Scenario Outline: Verify Contract info table contains "" row
Given I go to page "/address/0x3e7676937A7E96CFB7616f255b9AD9FF47363D4b"
Then Element with "text" "" should be "visible"
diff --git a/packages/app/tests/e2e/features/redirection/redirectionSet1.feature b/packages/app/tests/e2e/features/redirection/redirectionSet1.feature
index 70698f7185..468f71feab 100644
--- a/packages/app/tests/e2e/features/redirection/redirectionSet1.feature
+++ b/packages/app/tests/e2e/features/redirection/redirectionSet1.feature
@@ -45,7 +45,7 @@ Feature: Redirection
| Blocks | /blocks/ |
| Transactions | /transactions/ |
- @id253:II
+ @id253:I
Scenario Outline: Verify redirection for "" in Tools menu
Given I click by text "Tools "
When I click by element with partial href "" and text ""
@@ -56,26 +56,15 @@ Feature: Redirection
| Smart Contract Verification | /contracts/verify |
# | zkEVM Debugger | /tools/debugger |
- @id253:III @featureEnv @testnet
- Scenario Outline: Verify redirection for "" in Tools menu
- Given I click by text "Tools "
- When I click by element with partial href "" and text ""
- Then New page have "" address
-
- Examples:
- | Sub-Section | url |
- | Portal | https://goerli.staging-portal.zksync.dev/ |
-
-
- @id253:IIII @productionEnv @testnet
- Scenario Outline: Verify redirection for "" in Tools menu
+ @id253:III @featureEnv @testnetSmokeSuite @testnet
+ Scenario Outline: Verify redirection for "" in Tools menu (Sepolia)
Given I click by text "Tools "
When I click by element with partial href "" and text ""
Then New page have "" address
Examples:
- | Sub-Section | url | redirect_url |
- | Portal | https://zksync.io/explore#bridges | https://goerli.portal.zksync.io |
+ | Sub-Section | url | redirect_url |
+ | Bridge | https://portal.zksync.io/bridge/?network=sepolia | https://portal.zksync.io/bridge/?network=sepolia |
@id253:IV @featureEnv @mainnet
Scenario Outline: Verify redirection for "" in Tools menu
@@ -84,19 +73,8 @@ Feature: Redirection
Then New page have "" address
Examples:
- | Sub-Section | url |
- | Portal | https://staging-portal.zksync.dev/ |
-
-
- @id253:IV @productionEnv @mainnet
- Scenario Outline: Verify redirection for "" in Tools menu
- Given I click by text "Tools "
- When I click by element with partial href "" and text ""
- Then New page have "" address
-
- Examples:
- | Sub-Section | url | redirect_url |
- | Portal | https://zksync.io/explore#bridges | https://portal.zksync.io |
+ | Sub-Section | url |
+ | Bridge | https://portal.zksync.io/bridge/?network=mainnet |
#Account page
@id259 @testnet
diff --git a/packages/app/tests/mocks.ts b/packages/app/tests/mocks.ts
index 33dd3858dd..2e92981dba 100644
--- a/packages/app/tests/mocks.ts
+++ b/packages/app/tests/mocks.ts
@@ -42,7 +42,6 @@ export const GOERLI_NETWORK: NetworkConfig = {
l2ChainId: 280,
rpcUrl: "",
l2NetworkName: "Goerli",
- l2WalletUrl: "",
l1ExplorerUrl: "http://goerli-block-explorer",
maintenance: false,
published: true,
@@ -56,7 +55,6 @@ export const GOERLI_BETA_NETWORK: NetworkConfig = {
l2ChainId: 270,
rpcUrl: "",
l2NetworkName: "Goerli Beta",
- l2WalletUrl: "",
l1ExplorerUrl: "http://goerli-beta-block-explorer",
maintenance: false,
published: true,
diff --git a/packages/app/tests/views/ContractVerificationView.spec.ts b/packages/app/tests/views/ContractVerificationView.spec.ts
index 160d4e5117..064dcb4a89 100644
--- a/packages/app/tests/views/ContractVerificationView.spec.ts
+++ b/packages/app/tests/views/ContractVerificationView.spec.ts
@@ -44,13 +44,11 @@ describe("ContractVerificationView:", () => {
en: enUS,
},
});
-
it("has correct title", async () => {
expect(i18n.global.t(routes.find((e) => e.name === "contract-verification")?.meta?.title as string)).toBe(
"Smart Contract Verification"
);
});
-
it("uses contract address from query", async () => {
const wrapper = mount(ContractVerificationView, {
global: {
@@ -113,6 +111,52 @@ describe("ContractVerificationView:", () => {
expect(wrapper.find("#sourceCode").exists()).toBe(false);
expect(wrapper.find(".multi-file-verification").exists()).toBe(true);
});
+ it("shows zkVM checkbox by default", async () => {
+ const wrapper = mount(ContractVerificationView, {
+ global: {
+ stubs: ["router-link"],
+ plugins: [i18n, $testId],
+ },
+ });
+
+ expect(wrapper.find(".checkbox-input-container").exists()).toBe(true);
+ });
+ it("shows zkVM checkbox when solidity MFV was selected", async () => {
+ const wrapper = mount(ContractVerificationView, {
+ global: {
+ stubs: ["router-link"],
+ plugins: [i18n, $testId],
+ },
+ });
+
+ await wrapper.find("#compilerType").trigger("click");
+ await wrapper.find(`[aria-labelledby="compilerType"] > li:nth-child(2)`).trigger("click");
+ expect(wrapper.find(".checkbox-input-container").exists()).toBe(true);
+ });
+ it("doesn't show zkVM checkbox when vyper single file verification was select", async () => {
+ const wrapper = mount(ContractVerificationView, {
+ global: {
+ stubs: ["router-link"],
+ plugins: [i18n, $testId],
+ },
+ });
+
+ await wrapper.find("#compilerType").trigger("click");
+ await wrapper.find(`[aria-labelledby="compilerType"] > li:nth-child(3)`).trigger("click");
+ expect(wrapper.find(".checkbox-input-container").exists()).toBe(false);
+ });
+ it("doesn't show zkVM checkbox when vyper MFV was select", async () => {
+ const wrapper = mount(ContractVerificationView, {
+ global: {
+ stubs: ["router-link"],
+ plugins: [i18n, $testId],
+ },
+ });
+
+ await wrapper.find("#compilerType").trigger("click");
+ await wrapper.find(`[aria-labelledby="compilerType"] > li:nth-child(4)`).trigger("click");
+ expect(wrapper.find(".checkbox-input-container").exists()).toBe(false);
+ });
it("shows custom error text", async () => {
const mock = vi.spyOn(useContractVerification, "default").mockReturnValue({
...useContractVerification.default(),