NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7k stars 1.35k forks source link

`Error in plugin hardhat-vyper: File should always be found` #5463

Closed pcaversaccio closed 3 days ago

pcaversaccio commented 5 days ago

Version of Hardhat

2.22.5

What happened?

When I pushed the upgrade to Vyper version 0.4.0 here https://github.com/pcaversaccio/zksync-vyper-sandbox/commit/83b79c86f62e14038995dd18cd17f7102ddcf03c, the compilation started to fail with:

Solidity 0.8.26 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.

Learn more at https://hardhat.org/hardhat-runner/docs/reference/solidity-support

No need to generate any newer typings.
Compiling contracts for zkSync Era with zkvyper v1.5.1 and vyper v0.4.0
Error in plugin hardhat-vyper: File should always be found

For more info run Hardhat with --show-stack-traces

Minimal reproduction steps

  1. Clone this repo: https://github.com/pcaversaccio/zksync-vyper-sandbox.
  2. pnpm install
  3. pnpm compile

Search terms

vyper, hardhat-vyper

alcuadrado commented 3 days ago

Thanks for reporting this, @pcaversaccio! And congrats on 0.4.0!

Thanks a ton for fixing it @kiriyaga-txfusion! I'll release this fix right away.

alcuadrado commented 3 days ago

https://github.com/NomicFoundation/hardhat/releases/tag/%40nomiclabs%2Fhardhat-vyper%403.0.7

pcaversaccio commented 2 days ago

@kiriyaga-txfusion thanks for the fix and @alcuadrado for the quick release. Quickly tested and successfully deployed a 0.4.0 ZKsync Vyper contract here: https://sepolia-era.zksync.network/address/0x0E74203a877C6f681491388Bbd9bde4d0589C8e9#code.

We need to address another issue tho (will open a new issue) re verification of Vyper contracts that use modules. But that's for the other issue.