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 Vyper detection in EtherscanVerifier & Convert FileManager to async/await #5837

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

strmfos
Copy link

@strmfos strmfos commented Mar 5, 2025

Description:

This PR addresses Vyper contract detection within EtherscanVerifier by replacing the TODO comment with actual logic to handle Vyper compiler versions. It also refactors the FileManager from callback-based methods to fully async/await, removing the need for the old TODO comments and improving clarity. Key updates:

  • EtherscanVerifier :

Detects Vyper by checking metadata.compiler.language; appends vyper- to the version where appropriate.

  • FileManager:

Uses async/await in all file operations (readFile, setFileContent, etc.), removing outdated callback patterns and old TODO notes.

  • Additional cleanups: path normalization, error handling improvements, and removal of unnecessary comments throughout both files.

Copy link

netlify bot commented Mar 5, 2025

👷 Deploy request for remixproject pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 09f7394

Copy link
Contributor

@manuelwedler manuelwedler left a comment

Choose a reason for hiding this comment

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

I'm only speaking about the verification plugin changes:

This does not work at all. You didn't even try to run it I guess. Please only open a PR for Vyper support if it is completely working.

Comment on lines 47 to +48
const metadata = JSON.parse(compilerAbstract.data.contracts[submittedContract.filePath][submittedContract.contractName].metadata)
const language = metadata?.compiler?.language?.toLowerCase() || 'solidity'
Copy link
Contributor

Choose a reason for hiding this comment

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

Vyper does not have metadata

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.

2 participants