Skip to content

fix: verification endpoint alignment with etherscan#367

Open
kiriyaga-txfusion wants to merge 4 commits intomainfrom
kiriyaga-txfusion-etherscan-api-alignment
Open

fix: verification endpoint alignment with etherscan#367
kiriyaga-txfusion wants to merge 4 commits intomainfrom
kiriyaga-txfusion-etherscan-api-alignment

Conversation

@kiriyaga-txfusion
Copy link
Contributor

@kiriyaga-txfusion kiriyaga-txfusion commented Dec 25, 2024

What ❔

Resolved incompatibilities with the explorer's verification API endpoint.

Why ❔

For contract verification through Foundry and Hardhat, the API endpoint should function in the same way as it works on Etherscan.

fixes #351

Checklist

  • [+] PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • [+] Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@github-actions
Copy link

github-actions bot commented Dec 25, 2024

API E2E Test Results

207 tests   207 ✅  20s ⏱️
 14 suites    0 💤
  1 files      0 ❌

Results for commit 3ca1ce0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 25, 2024

Unit Test Results

    4 files    265 suites   12m 3s ⏱️
2 151 tests 2 150 ✅ 1 💤 0 ❌
2 365 runs  2 364 ✅ 1 💤 0 ❌

Results for commit 3ca1ce0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 25, 2024

Visit the preview URL for this PR:
https://staging-scan-v2--pr-367-5exqbsms.web.app

].includes(request.codeformat);

// eslint-disable-next-line @typescript-eslint/no-var-requires
const semver = require("semver");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not import it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Import doesn't work because the semver package only functions with CommonJS modules. I found a workaround using require to properly use the object.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you try to add types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried with semver and its type, but the dependency object is always null.

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.

Address explorer etherscan-like APIs incompatibilities

4 participants