Skip to content

chore: viaIR compilation enabled for Foundry with explicit solc v0.8.30 #2073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2025
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
13 changes: 11 additions & 2 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@

[profile.default]
solc = "0.8.30"
via_ir = true
optimizer = true
optimizer_runs = 500
optimizer_details = { yulDetails = { stackAllocation = true } }
additional_compiler_profiles = [
{ name = "tests", via_ir = false }
]
compilation_restrictions = [
{ paths = "test/foundry/KlerosCore.t.sol", via_ir = false },
]
src = 'src'
out = 'out'
libs = ['../node_modules', 'lib']

[rpc_endpoints]
arbitrumSepolia = "https://sepolia-rollup.arbitrum.io/rpc"
arbitrumGoerli = "https://goerli-rollup.arbitrum.io/rpc"
arbitrum = "https://arb1.arbitrum.io/rpc"
sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}"
goerli = "https://goerli.infura.io/v3/${INFURA_API_KEY}"
mainnet = "https://mainnet.infura.io/v3/${INFURA_API_KEY}"
chiado = "https://rpc.chiado.gnosis.gateway.fm"
gnosischain = "https://rpc.gnosis.gateway.fm"
Expand Down
18 changes: 1 addition & 17 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,7 @@ const config: HardhatUserConfig = {
viaIR: true,
optimizer: {
enabled: true,
runs: 100,
},
outputSelection: {
"*": {
"*": ["storageLayout"],
},
},
},
},
{
// For Vea
version: "0.8.24",
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 100,
runs: 10000,
},
outputSelection: {
"*": {
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
},
"dependencies": {
"@chainlink/contracts": "^1.4.0",
"@kleros/vea-contracts": "^0.6.0",
"@kleros/vea-contracts": "^0.7.0",
"@openzeppelin/contracts": "^5.4.0",
"@shutter-network/shutter-sdk": "0.0.2",
"isomorphic-fetch": "^3.0.0"
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6123,7 +6123,7 @@ __metadata:
"@kleros/kleros-v2-eslint-config": "workspace:^"
"@kleros/kleros-v2-prettier-config": "workspace:^"
"@kleros/kleros-v2-tsconfig": "workspace:^"
"@kleros/vea-contracts": "npm:^0.6.0"
"@kleros/vea-contracts": "npm:^0.7.0"
"@logtail/pino": "npm:^0.5.0"
"@nomicfoundation/hardhat-chai-matchers": "npm:^2.1.0"
"@nomicfoundation/hardhat-ethers": "npm:^3.1.0"
Expand Down Expand Up @@ -6402,10 +6402,10 @@ __metadata:
languageName: node
linkType: hard

"@kleros/vea-contracts@npm:^0.6.0":
version: 0.6.0
resolution: "@kleros/vea-contracts@npm:0.6.0"
checksum: 10/1dafd94620d3392c2e00e09e7d1ca923007143f8625b4b584411a7b49404ae5630e870d3e260685964d37ccb9c4c4ab406523b8ec4dd9f89bcf6099a4f5976ec
"@kleros/vea-contracts@npm:^0.7.0":
version: 0.7.0
resolution: "@kleros/vea-contracts@npm:0.7.0"
checksum: 10/bba12886020cd4bfce39938de56edf2b56472627871ef91b10b721de655e5c20f632a8cb57679927d868375218007898b12033d769b7d33cd3f18447ca093896
languageName: node
linkType: hard

Expand Down
Loading