Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ revert_strings = "strip"
fs_permissions = [{ access = "read", path = "./"}]

solc = "0.8.24"
evm_version = "prague"
evm_version = "cancun"

[profile.zksync]
src = "contracts/Lens_SpokePool.sol"
Expand Down
15 changes: 15 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const isTest = process.env.IS_TEST === "true" || process.env.CI === "true";
const compileZk = process.env.COMPILE_ZK === "true";

const solcVersion = "0.8.24";
const evmVersion = "cancun";

// Compilation settings are overridden for large contracts to allow them to compile without going over the bytecode
// limit.
Expand All @@ -65,6 +66,7 @@ const LARGE_CONTRACT_COMPILER_SETTINGS = {
settings: {
optimizer: { enabled: true, runs: 800 },
viaIR: true,
evmVersion,
debug: { revertStrings: isTest ? "debug" : "strip" },
},
};
Expand All @@ -73,6 +75,7 @@ const DEFAULT_CONTRACT_COMPILER_SETTINGS = {
settings: {
optimizer: { enabled: true, runs: 1000000 },
viaIR: true,
evmVersion,
// Only strip revert strings if not testing or in ci.
debug: { revertStrings: isTest ? "debug" : "strip" },
},
Expand All @@ -83,6 +86,7 @@ const LARGEST_CONTRACT_COMPILER_SETTINGS = {
settings: {
optimizer: { enabled: true, runs: 50 },
viaIR: true,
evmVersion,
debug: { revertStrings: isTest ? "debug" : "strip" },
},
};
Expand All @@ -97,12 +101,23 @@ const config: HardhatUserConfig = {
// NOTE: Linea only supports 0.8.19.
// See https://docs.linea.build/build-on-linea/ethereum-differences#evm-opcodes
version: "0.8.19",
settings: {
optimizer: { enabled: true, runs: 50 },
viaIR: true,
debug: { revertStrings: isTest ? "debug" : "strip" },
},
},
"contracts/SpokePoolVerifier.sol": {
...DEFAULT_CONTRACT_COMPILER_SETTINGS,
// NOTE: Linea only supports 0.8.19.
// See https://docs.linea.build/build-on-linea/ethereum-differences#evm-opcodes
version: "0.8.19",
settings: {
optimizer: { enabled: true, runs: 1000000 },
viaIR: true,
// Only strip revert strings if not testing or in ci.
debug: { revertStrings: isTest ? "debug" : "strip" },
},
},
"contracts/Universal_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Arbitrum_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"lint-js": "yarn prettier --list-different **/*.js **/*.ts",
"lint-rust": "cargo +nightly fmt --all -- --check && cargo clippy",
"lint-fix": "yarn prettier --write **/*.js **/*.ts ./programs/**/*.rs ./contracts**/*.sol && cargo +nightly fmt --all && cargo clippy",
"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",
"clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain out zkout",
"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",
"clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain cache-foundry out zkout",
"generate-svm-artifacts": "bash ./scripts/svm/buildHelpers/buildIdl.sh && sh ./scripts/svm/buildHelpers/generateSvmAssets.sh && yarn generate-svm-clients",
"generate-svm-clients": "yarn ts-node ./scripts/svm/buildHelpers/generateSvmClients.ts && yarn ts-node ./scripts/svm/buildHelpers/renameClientsImports.ts",
"build-evm": "hardhat compile",
Expand Down
Loading