From baab5e614875513cd2aab2c794d9de3d46688a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Rodr=C3=ADguez?= Date: Tue, 23 Jul 2024 13:20:50 -0300 Subject: [PATCH] chore(test): bump solc to 0.26.0 (#474) --- zk-tests/foundry.toml | 1 - zk-tests/src/ConstantNumber.sol | 2 +- zk-tests/src/LargeContracts.sol | 2 +- zk-tests/test.sh | 8 ++++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/zk-tests/foundry.toml b/zk-tests/foundry.toml index 60751e179..f832875b5 100644 --- a/zk-tests/foundry.toml +++ b/zk-tests/foundry.toml @@ -3,7 +3,6 @@ src = 'src' out = 'out' libs = ['lib'] fs_permissions = [{ access = "read", path = "./zkout/ConstantNumber.sol/ConstantNumber.json"}] -evm_version = "paris" [fuzz] no_zksync_reserved_addresses = true diff --git a/zk-tests/src/ConstantNumber.sol b/zk-tests/src/ConstantNumber.sol index 5c08b9128..e93362f9a 100644 --- a/zk-tests/src/ConstantNumber.sol +++ b/zk-tests/src/ConstantNumber.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.20; +pragma solidity ^0.8.20; contract ConstantNumber { function ten() public pure returns (uint8) { diff --git a/zk-tests/src/LargeContracts.sol b/zk-tests/src/LargeContracts.sol index d6d83422a..bb1fcc2de 100644 --- a/zk-tests/src/LargeContracts.sol +++ b/zk-tests/src/LargeContracts.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** String generated via the following JS code: diff --git a/zk-tests/test.sh b/zk-tests/test.sh index 0d0e2e953..312b093ba 100755 --- a/zk-tests/test.sh +++ b/zk-tests/test.sh @@ -4,7 +4,7 @@ set -o pipefail -e REPO_ROOT=".." -SOLC_VERSION=${SOLC_VERSION:-"v0.8.20"} +SOLC_VERSION=${SOLC_VERSION:-"v0.8.26"} SOLC="solc-${SOLC_VERSION}" FORGE="${REPO_ROOT}/target/release/forge" CAST="${REPO_ROOT}/target/release/cast" @@ -142,14 +142,14 @@ RUST_LOG=warn "${FORGE}" script ./script/Deploy.s.sol:DeployScript --broadcast - # RUST_LOG=warn "${FORGE}" script ./src/LargeFactoryDependencies.t.sol:ZkLargeFactoryDependenciesScript --broadcast --private-key "$PRIVATE_KEY" --chain 260 --gas-estimate-multiplier 310 --rpc-url "$RPC_URL" --use "./${SOLC}" --slow -vvv --zk-startup || fail "forge script failed" echo "Running NFT script" -RUST_LOG=warn "${FORGE}" script ./script/NFT.s.sol:MyScript --broadcast --private-key $PRIVATE_KEY --rpc-url $RPC_URL --use 0.8.20 --zk-startup || fail "forge script failed" +RUST_LOG=warn "${FORGE}" script ./script/NFT.s.sol:MyScript --broadcast --private-key $PRIVATE_KEY --rpc-url $RPC_URL --use 0.8.26 --zk-startup || fail "forge script failed" echo "Running Proxy script" -RUST_LOG=warn "${FORGE}" script ./script/Proxy.s.sol:ProxyScript --broadcast --private-key $PRIVATE_KEY --rpc-url $RPC_URL --use 0.8.20 --zk-startup || fail "forge proxy script failed" +RUST_LOG=warn "${FORGE}" script ./script/Proxy.s.sol:ProxyScript --broadcast --private-key $PRIVATE_KEY --rpc-url $RPC_URL --use 0.8.26 --zk-startup || fail "forge proxy script failed" # Deploy ERC20 echo "Deploying MyToken..." -MYTOKEN_DEPLOYMENT=$(RUST_LOG=warn "${FORGE}" create ./src/ERC20.sol:MyToken --rpc-url $RPC_URL --private-key $PRIVATE_KEY --use 0.8.20 --zk-startup) || fail "forge script failed" +MYTOKEN_DEPLOYMENT=$(RUST_LOG=warn "${FORGE}" create ./src/ERC20.sol:MyToken --rpc-url $RPC_URL --private-key $PRIVATE_KEY --use 0.8.26 --zk-startup) || fail "forge script failed" MYTOKEN_ADDRESS=$(echo $MYTOKEN_DEPLOYMENT | awk '/Deployed to:/ {for (i=1; i<=NF; i++) if ($i == "to:") print $(i+1)}') echo "MyToken deployed at: $MYTOKEN_ADDRESS"