Skip to content

Commit 52d0162

Browse files
authored
fix: Set version to cancun (#1162)
* fix: Set version to cancun Signed-off-by: Faisal Usmani <[email protected]> * remove evmVersion on overrides Signed-off-by: Faisal Usmani <[email protected]> --------- Signed-off-by: Faisal Usmani <[email protected]>
1 parent ec9bd79 commit 52d0162

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ revert_strings = "strip"
3434
fs_permissions = [{ access = "read", path = "./"}]
3535

3636
solc = "0.8.24"
37-
evm_version = "prague"
37+
evm_version = "cancun"
3838

3939
[profile.zksync]
4040
src = "contracts/Lens_SpokePool.sol"

hardhat.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const isTest = process.env.IS_TEST === "true" || process.env.CI === "true";
5757
const compileZk = process.env.COMPILE_ZK === "true";
5858

5959
const solcVersion = "0.8.24";
60+
const evmVersion = "cancun";
6061

6162
// Compilation settings are overridden for large contracts to allow them to compile without going over the bytecode
6263
// limit.
@@ -65,6 +66,7 @@ const LARGE_CONTRACT_COMPILER_SETTINGS = {
6566
settings: {
6667
optimizer: { enabled: true, runs: 800 },
6768
viaIR: true,
69+
evmVersion,
6870
debug: { revertStrings: isTest ? "debug" : "strip" },
6971
},
7072
};
@@ -73,6 +75,7 @@ const DEFAULT_CONTRACT_COMPILER_SETTINGS = {
7375
settings: {
7476
optimizer: { enabled: true, runs: 1000000 },
7577
viaIR: true,
78+
evmVersion,
7679
// Only strip revert strings if not testing or in ci.
7780
debug: { revertStrings: isTest ? "debug" : "strip" },
7881
},
@@ -83,6 +86,7 @@ const LARGEST_CONTRACT_COMPILER_SETTINGS = {
8386
settings: {
8487
optimizer: { enabled: true, runs: 50 },
8588
viaIR: true,
89+
evmVersion,
8690
debug: { revertStrings: isTest ? "debug" : "strip" },
8791
},
8892
};
@@ -97,12 +101,23 @@ const config: HardhatUserConfig = {
97101
// NOTE: Linea only supports 0.8.19.
98102
// See https://docs.linea.build/build-on-linea/ethereum-differences#evm-opcodes
99103
version: "0.8.19",
104+
settings: {
105+
optimizer: { enabled: true, runs: 50 },
106+
viaIR: true,
107+
debug: { revertStrings: isTest ? "debug" : "strip" },
108+
},
100109
},
101110
"contracts/SpokePoolVerifier.sol": {
102111
...DEFAULT_CONTRACT_COMPILER_SETTINGS,
103112
// NOTE: Linea only supports 0.8.19.
104113
// See https://docs.linea.build/build-on-linea/ethereum-differences#evm-opcodes
105114
version: "0.8.19",
115+
settings: {
116+
optimizer: { enabled: true, runs: 1000000 },
117+
viaIR: true,
118+
// Only strip revert strings if not testing or in ci.
119+
debug: { revertStrings: isTest ? "debug" : "strip" },
120+
},
106121
},
107122
"contracts/Universal_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
108123
"contracts/Arbitrum_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"lint-js": "yarn prettier --list-different **/*.js **/*.ts",
2626
"lint-rust": "cargo +nightly fmt --all -- --check && cargo clippy",
2727
"lint-fix": "yarn prettier --write **/*.js **/*.ts ./programs/**/*.rs ./contracts**/*.sol && cargo +nightly fmt --all && cargo clippy",
28-
"clean-fast": "for dir in node_modules cache cache-zk artifacts artifacts-zk dist typechain out zkout; do mv \"${dir}\" \"_${dir}\"; rm -rf \"_${dir}\" &; done",
29-
"clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain out zkout",
28+
"clean-fast": "for dir in node_modules cache cache-zk artifacts artifacts-zk dist typechain cache-foundry out zkout; do mv \"${dir}\" \"_${dir}\"; rm -rf \"_${dir}\" &; done",
29+
"clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain cache-foundry out zkout",
3030
"generate-svm-artifacts": "bash ./scripts/svm/buildHelpers/buildIdl.sh && sh ./scripts/svm/buildHelpers/generateSvmAssets.sh && yarn generate-svm-clients",
3131
"generate-svm-clients": "yarn ts-node ./scripts/svm/buildHelpers/generateSvmClients.ts && yarn ts-node ./scripts/svm/buildHelpers/renameClientsImports.ts",
3232
"build-evm": "hardhat compile",

0 commit comments

Comments
 (0)