Skip to content

Commit dff3eb4

Browse files
kiriyaga-txfusionkiriyagaitsacoyote
authored
docs: switch-to-default-codegen-with-zksolc (#141)
<!-- 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 <[email protected]> Co-authored-by: Sabrina <[email protected]>
1 parent e595970 commit dff3eb4

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

content/00.build/40.tooling/20.hardhat/40.hardhat-zksync-solc.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ zksolc: {
6868
compilerPath: "zksolc", // optional. Ignored for compilerSource "docker". Can be used if compiler is located in a specific folder
6969
libraries:{}, // optional. References to non-inlinable libraries
7070
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
71-
isSystem: false, // optional. Enables Yul instructions available only for ZKsync system contracts and libraries
72-
forceEvmla: false, // optional. Falls back to EVM legacy assembly if there is a bug with Yul
71+
enableEraVMExtensions: false, // optional. Enables Yul instructions available only for ZKsync system contracts and libraries
72+
forceEVMLA: false, // optional. Falls back to EVM legacy assembly if there is a bug with Yul
7373
optimizer: {
7474
enabled: true, // optional. True by default
7575
mode: '3', // optional. 3 by default, z to optimize bytecode size
@@ -100,8 +100,8 @@ Learn more about [compiling libraries here](compiling-libraries)
100100
A `hardhat-zksync-deploy` plugin uses this cache later to compile and deploy the libraries,
101101
especially when the `deploy-zksync:libraries` task is executed.
102102
Defaults to `./.zksolc-libraries-cache/missingLibraryDependencies.json`.
103-
- `isSystem` - required if contracts use enables Yul instructions available only for ZKsync system contracts and libraries
104-
- `forceEvmla` - falls back to EVM legacy assembly if there is an issue with the Yul IR compilation pipeline.
103+
- `enableEraVMExtensions` - required if contracts use enables Yul instructions available only for ZKsync system contracts and libraries
104+
- `forceEVMLA` - falls back to EVM legacy assembly if there is an issue with the Yul IR compilation pipeline.
105105
- `optimizer` - Compiler optimizations:
106106
- `enabled`: `true` (default) or `false`.
107107
- `mode`: `3` (default) recommended for most projects. Mode `z` reduces bytecode size for large projects that make heavy use of `keccak` and far calls.
@@ -114,9 +114,16 @@ The contract names do not necessarily need to be written in full qualified form.
114114
The plugin will perform an include operation, attempting to match the provided contract names.
115115

116116
::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
117-
**forceEvmla usage**
117+
The `isSystem` and `forceEvmla` arguments are deprecated in favor of `enableEraVMExtensions` and `forceEVMLA`.
118+
If the deprecated arguments are used, a warning will be displayed and they will be automatically switched to the new naming with the provided values.
118119

119-
Setting the `forceEvmla` field to true can have the following negative impacts:
120+
Starting from zksolc version 1.5.0, the ZKSync Era Solidity Compiler will be used by default with the latest version if not specified in hardhat.config.ts
121+
::
122+
123+
::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
124+
**forceEVMLA usage**
125+
126+
Setting the `forceEVMLA` field to true can have the following negative impacts:
120127

121128
- No support for recursion.
122129
- No support for internal function pointers.

0 commit comments

Comments
 (0)