-
Notifications
You must be signed in to change notification settings - Fork 227
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: switch to the default codegen with zksolc #1062
Conversation
…is in use, change readme files and add debug output
@@ -29,8 +29,9 @@ zksolc: { | |||
compilerPath: "zksolc", // optional. Ignored for compilerSource "docker". Can be used if compiler is located in a specific folder | |||
libraries:{}, // optional. References to non-inlinable libraries | |||
missingLibrariesPath: "./.zksolc-libraries-cache/missingLibraryDependencies.json" // optional. This path serves as a cache that stores all the libraries that are missing or have dependencies on other libraries. A `hardhat-zksync-deploy` plugin uses this cache later to compile and deploy the libraries, especially when the `deploy-zksync:libraries` task is executed | |||
isSystem: false, // optional. Enables Yul instructions available only for zkSync system contracts and libraries | |||
forceEvmla: false, // optional. Falls back to EVM legacy assembly if there is a bug with Yul | |||
enableEraVMExtensions: false, // optional. Enables Yul instructions available only for zkSync system contracts and libraries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we will do for the previous versions. I think we should somewhere put what was used for the previous versions.
|
||
Usage of zksolc compiler version greater or equal to 1.5.0 | ||
|
||
- It's necessary to set the viaYul or viaEVMAssembly flag to true at zksolc settings to specify the compiler codegen manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is mandatory to specify the compiler codegen manually. This can be done by setting either the viaYul or viaEVMAssembly flag to true in the zksolc settings. Only one of these flags can be set to true at a time, ensuring that the code generation process is clearly defined.
Usage of zksolc compiler version greater or equal to 1.5.0 | ||
|
||
- It's necessary to set the viaYul or viaEVMAssembly flag to true at zksolc settings to specify the compiler codegen manually. | ||
- When viaEVMAssembly is used, compiler expect only zkSync Era Solidity Compiler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"compiler expect only zkSync Era Solidity Compiler" - please rephrase this part
|
||
const [major, minor] = getVersionComponents(compiler.version); | ||
if (zksolc.settings.viaYul && major === 0 && minor < 8) { | ||
console.warn(COMPILER_ZKSOLC_NEED_EVM_CODEGEN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: console.info(chalk.yellow(...
<!-- Thank you for contributing to the ZKsync Docs! Before submitting the PR, please make sure you do the following: - Update your PR title to follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) - Read the [Contributing Guide](https://github.com/matter-labs/zksync-docs/blob/main/CONTRIBUTING.md). - Understand our [Code of Conduct](https://github.com/matter-labs/zksync-docs/blob/main/CODE_OF_CONDUCT.md) - Please delete any unused parts of the template when submitting your PR --> # Description Switches to the default codegen with the zksolc These changes with new version 1.5.0 of zksolc will affect a plugin where arguments will be sent from standard json input. ## Additional context matter-labs/hardhat-zksync#1176 matter-labs/hardhat-zksync#1062 Co-authored-by: Marko Arambasic <makiarambasic@gmail.com> Co-authored-by: Sabrina <sf@matterlabs.dev>
What 💻
Why ✋