matter-labs/hardhat-zksync

zksolc 1.4.0 is not supported

boyuanx opened this issue ยท 2 comments

๐Ÿ› Bug Report for hardaht-zksync plugins

๐Ÿ’ฅ Plugin name

@matterlabs/hardhat-zksync-solc

๐Ÿ“ Description

When attempting to compile with zksolc 1.4.0 and @matterlabs/hardhat-zksync-solc 1.1.3, the following error message is displayed:

Error in plugin @matterlabs/hardhat-zksync-solc: The zksolc compiler version (1.4.0) in the hardhat config file is not within the allowed range. Please use versions 1.3.13 to 1.3.23.

๐Ÿ”„ Reproduction Steps

  1. Use Solidity 0.8.24, zksolc 1.4.0, and "@matterlabs/hardhat-zksync-solc": "1.1.3"
  2. Attempt to compile using zksolc
  3. Error

๐Ÿค” Expected Behavior

The contract should compile successfully.

๐Ÿ˜ฏ Current Behavior

@matterlabs/hardhat-zksync-solc 1.1.3 doesn't seem to support the latest version of zksolc

๐Ÿ–ฅ๏ธ Environment

  • Node version: 20.9.0
  • Operating System & Version: macOS 14.2.1 (23C71)
  • Other relevant environment details:

๐Ÿ“‹ Additional Context

For some reason, the exact same config works on my colleague's system.

When using latest as the zksolc version, 1.3.23 is used.

I have attempted to delete node_modules and any cache folders.

๐Ÿ“Ž Log Output

npx hardhat deploy --tags xxxx --network zkSyncTestnet
[
  {
    version: '0.8.24',
    settings: {
      optimizer: [Object],
      evmVersion: 'paris',
      outputSelection: [Object]
    }
  }
]
Error in plugin @matterlabs/hardhat-zksync-solc: The zksolc compiler version (1.4.0) in the hardhat config file is not within the allowed range. Please use versions 1.3.13 to 1.3.23.

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

Hey @boyuanx ๐Ÿ‘‹, the hardhat-zksync-solc plugin has a caching mechanism for the list of allowed compiler versions to avoid throttling. It seems that the file responsible for the caching mechanism was updated in the past 24 hours, but during that time, there was no zksolc 1.4.0 compiler release (which you set explicitly in the hardhat config file). Please feel free to delete the file named compilerVersionInfo.json from your file system - this will trigger its update. The location of this file is the same as where the zksolc compilers are stored on your file system. For example, on a Mac, this path looks something like this: /Users/<USERNAME>/Library/Caches/hardhat-nodejs/compilers-v2/zksolc.

That worked, thank you :)