Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions packages/app/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,14 @@
},
"underline": "If you enabled optimization during compilation, select yes."
},
"enableEraVMExtensionsUsed": {
"label": "Enable EraVM Extensions",
"options": {
"yes": "Yes",
"no": "No"
},
"underline": "If you enabled EraVM Extensions during compilation, select yes."
},
"solcVersion": {
"label": "Solc Version",
"placeholder": "Choose version",
Expand Down
8 changes: 8 additions & 0 deletions packages/app/src/locales/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@
},
"underline": "Якщо ви ввімкнули оптимізацію під час компіляції, виберіть так."
},
"enableEraVMExtensionsUsed": {
"label": "Ввімкнути EraVM Extensions",
"options": {
"yes": "Так",
"no": "Ні"
},
"underline": "Якщо ви ввімкнули EraVM Extensions під час компіляції, виберіть так."
},
"solcVersion": {
"label": "Solc версія",
"placeholder": "Вибрати версію",
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type ContractVerificationData = {
contractAddress: string;
contractName: string;
optimizationUsed: boolean;
enableEraVMExtensionsUsed: boolean;
sourceCode:
| string
| {
Expand All @@ -48,6 +49,7 @@ export type ContractVerificationData = {
};
};
settings: {
enableEraVMExtensions: boolean;
optimizer: {
enabled: boolean;
};
Expand Down
31 changes: 30 additions & 1 deletion packages/app/src/views/ContractVerificationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,33 @@
</div>
<template #underline>{{ t("contractVerification.form.optimizationUsed.underline") }}</template>
</FormItem>

<FormItem
tag="fieldset"
:label="t('contractVerification.form.enableEraVMExtensionsUsed.label')"
label-tag="legend"
>
<div class="grid w-max grid-cols-2 items-center gap-4" :data-testid="$testId.enableEraVMExtensionsRadioButtons">
<RadioInput
id="enableEraVMExtensionsUsed-yes"
name="enableEraVMExtensionsUsed"
:disabled="isRequestPending"
:value="true"
v-model="form.enableEraVMExtensionsUsed"
>
{{ t("contractVerification.form.enableEraVMExtensionsUsed.options.yes") }}
</RadioInput>
<RadioInput
id="enableEraVMExtensionsUsed-no"
name="enableEraVMExtensionsUsed"
:disabled="isRequestPending"
:value="false"
v-model="form.enableEraVMExtensionsUsed"
>
{{ t("contractVerification.form.enableEraVMExtensionsUsed.options.no") }}
</RadioInput>
</div>
<template #underline>{{ t("contractVerification.form.enableEraVMExtensionsUsed.underline") }}</template>
</FormItem>
<h3 class="form-subheading">Contract info</h3>
<FormItem id="contractName" :label="t('contractVerification.form.contractName.label')">
<Input
Expand Down Expand Up @@ -403,6 +429,7 @@ const defaultValues = computed<
contractName: "",
contractPath: "",
optimizationUsed: true,
enableEraVMExtensionsUsed: false,
zkCompilerVersion: selectedZkCompiler.value.versions[0] || "",
compilerVersion: selectedCompiler.value.versions[0] || "",
sourceCode: "",
Expand Down Expand Up @@ -545,6 +572,7 @@ async function submitForm() {
codeFormat: ContractVerificationCodeFormatEnum[selectedCompilationType.value],
contractAddress: form.value.contractAddress,
optimizationUsed: form.value.optimizationUsed,
enableEraVMExtensionsUsed: form.value.enableEraVMExtensionsUsed,
zkCompilerVersion: form.value.zkCompilerVersion,
compilerVersion: form.value.compilerVersion,
constructorArguments: form.value.constructorArguments,
Expand Down Expand Up @@ -576,6 +604,7 @@ async function submitForm() {
optimizer: {
enabled: form.value.optimizationUsed,
},
enableEraVMExtensions: form.value.enableEraVMExtensionsUsed,
},
},
...commonData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe("useContractVerification:", () => {
contractAddress: "",
contractName: "",
optimizationUsed: false,
enableEraVMExtensionsUsed: false,
sourceCode: "",
zkCompilerVersion: "",
compilerVersion: "",
Expand Down
21 changes: 11 additions & 10 deletions packages/app/tests/e2e/features/artifacts/artifactsSet1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,14 @@ Feature: Main Page
Then Element with "<Selector type>" "<Element>" should be "<Assertion>"

Examples:
| Selector type | Element | Assertion |
| id | contractAddress | visible |
| id | contractName | visible |
| testId | radio-buttons | visible |
| id | compilerVersion | visible |
| id | zkCompilerVersion | visible |
| id | sourceCode | visible |
| id | constructorArguments | visible |
| text | Verify Smart Contract | clickable |
| text | Clear | clickable |
| Selector type | Element | Assertion |
| id | contractAddress | visible |
| id | contractName | visible |
| testId | radio-buttons-optimization | visible |
| testId | radio-buttons-enable-era-extensions | visible |
| id | compilerVersion | visible |
| id | zkCompilerVersion | visible |
| id | sourceCode | visible |
| id | constructorArguments | visible |
| text | Verify Smart Contract | clickable |
| text | Clear | clickable |
3 changes: 2 additions & 1 deletion packages/app/tests/e2e/testId.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"direction": "direction",
"initiatorsAddress": "initiators-address",
"fromAddress": "from-address",
"optimizationRadioButtons": "radio-buttons",
"optimizationRadioButtons": "radio-buttons-optimization",
"enableEraVMExtensionsRadioButtons": "radio-buttons-enable-era-extensions",
"pageTitle": "page-title",
"previousInstructionButton": "previous-instruction-navigation-button",
"showInstructionMetadataButton": "show-instruction-metadata-button",
Expand Down