From a36c165ddfeed2f93dc8eb40dda3ce1d8648431d Mon Sep 17 00:00:00 2001 From: Joaquin Carletti Date: Mon, 27 Nov 2023 08:19:40 -0300 Subject: [PATCH 1/2] update zksolc version --- etc/system-contracts/hardhat.config.ts | 2 +- etc/system-contracts/scripts/compile-yul.ts | 2 +- etc/test-contracts/hardhat.config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/system-contracts/hardhat.config.ts b/etc/system-contracts/hardhat.config.ts index 6756762b4..5a5a146c8 100644 --- a/etc/system-contracts/hardhat.config.ts +++ b/etc/system-contracts/hardhat.config.ts @@ -7,7 +7,7 @@ const systemConfig = require('./SystemConfig.json'); export default { zksolc: { - version: '1.3.14', + version: '1.3.17', compilerSource: 'binary', settings: { isSystem: true diff --git a/etc/system-contracts/scripts/compile-yul.ts b/etc/system-contracts/scripts/compile-yul.ts index 75c1316df..d90ce862d 100644 --- a/etc/system-contracts/scripts/compile-yul.ts +++ b/etc/system-contracts/scripts/compile-yul.ts @@ -4,7 +4,7 @@ import { exec as _exec, spawn as _spawn } from 'child_process'; import { getZksolcUrl, saltFromUrl } from '@matterlabs/hardhat-zksync-solc'; -const COMPILER_VERSION = '1.3.14'; +const COMPILER_VERSION = '1.3.17'; const IS_COMPILER_PRE_RELEASE = false; import path from "path"; diff --git a/etc/test-contracts/hardhat.config.ts b/etc/test-contracts/hardhat.config.ts index 6756762b4..5a5a146c8 100644 --- a/etc/test-contracts/hardhat.config.ts +++ b/etc/test-contracts/hardhat.config.ts @@ -7,7 +7,7 @@ const systemConfig = require('./SystemConfig.json'); export default { zksolc: { - version: '1.3.14', + version: '1.3.17', compilerSource: 'binary', settings: { isSystem: true From 75fa7bb734fe65ba709bd1b20df3d48bf22f3dde Mon Sep 17 00:00:00 2001 From: Joaquin Carletti Date: Mon, 27 Nov 2023 08:40:49 -0300 Subject: [PATCH 2/2] change console.yul log address --- etc/system-contracts/contracts/precompiles/Console.yul | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/system-contracts/contracts/precompiles/Console.yul b/etc/system-contracts/contracts/precompiles/Console.yul index e693e6661..eec3209b5 100644 --- a/etc/system-contracts/contracts/precompiles/Console.yul +++ b/etc/system-contracts/contracts/precompiles/Console.yul @@ -5,7 +5,9 @@ object "Console" { // CONSOLE.LOG Caller // It prints 'val' in the node console and it works using the 'mem'+0x40 memory sector function console_log(mem, val) -> { - let log_address := 0x000000000000000000636F6e736F6c652e6c6f67 + // With zksolc 1.13.17 version, log_address must be 16 bit long + // let log_address := 0x000000000000000000636F6e736F6c652e6c6f67 + let log_address := 0x000000000000000000000000000000000000f000 // load the free memory pointer let freeMemPointer := mload(mem) // store the function selector of log(uint256) in memory