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

feat: Contract Verification dialog should make use of Sourcify Session Verification API #811

Merged
merged 9 commits into from
Dec 19, 2023

Conversation

ericleponner
Copy link
Collaborator

@ericleponner ericleponner commented Dec 19, 2023

Description:

With the changes below, Explorer now uses on Sourcify Session Verification API.

In Explorer, Contract Verification dialog performs a verification preview which enables user to known whether verification will be a full or partial before publishing contract on Hedera Sourcify service.

So far, this preview was an approximation of the verification process performed by Hedera Sourcify Server. By using Sourcify Session Verification (an dryrun flag), Explorer preview follow exactly the same process as Hedera Sourcify Server.

Related issue(s):

Fixes #799 , #756

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ericleponner ericleponner requested a review from svienot December 19, 2023 17:05
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 88.23% 32647 / 36998
🔵 Statements 88.23% 32647 / 36998
🔵 Functions 66.72% 788 / 1181
🔵 Branches 84.34% 3647 / 4324
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/AppStorage.ts 74.4% 68.42% 53.33% 74.4% 51-52, 55-56, 70-71, 98-100, 103-105, 117-118, 128-129, 131-132, 141-150, 153-167
src/components/contract/ContractByteCodeSection.vue 97.81% 90% 25% 97.81% 32-33, 152-153
src/components/verification/ContractVerificationDialog.vue 76.33% 76.19% 5% 76.33% 51, 181-185, 188-194, 201-203, 212-216, 219-224, 239-240, 249, 251, 253-255, 257, 265-266, 274-276, 288-331, 334-337, 349-353
src/components/verification/FileList.vue 66.01% 100% 0% 66.01% 105-174
src/schemas/HederaUtils.ts 80.46% 75.34% 82.35% 80.46% 29-31, 37-38, 46-47, 70-71, 81-84, 94-97, 102-103, 145-154, 156-157, 163-164, 207-215
src/utils/analyzer/ContractSourceAnalyzer.ts 63.39% 64.28% 33.33% 63.39% 58, 77-87, 92-106, 109-123, 126-130, 137-145
src/utils/analyzer/FileImporter.ts 30.67% 100% 0% 30.67% 25-40, 42-48, 55-59, 61-86, 94-105, 113-122, 124-126, 128-146, 148-152, 154-163
src/utils/cache/CacheUtils.ts 100% 100% 100% 100%
src/utils/cache/SourcifyCache.ts 93.6% 66.66% 100% 93.6% 50-51, 92-93, 96-97, 99-100
src/utils/sourcify/SourcifyUtils.ts 52.63% 100% 16.66% 52.63% 35-48, 51-74, 77-113, 120-128, 131-136
Generated in workflow #603

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Copy link
Collaborator

@svienot svienot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ericleponner ericleponner merged commit 13896e0 into main Dec 19, 2023
4 of 5 checks passed
@ericleponner ericleponner deleted the 00599_contract_verif_v6 branch December 19, 2023 18:22
svienot added a commit that referenced this pull request Jan 8, 2024
…y Session Verification API (#811)"

This reverts commit 13896e0.
@ericleponner ericleponner restored the 00599_contract_verif_v6 branch January 10, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contract Verification dialog should make use of Sourcify Session Verification API
2 participants