Skip to content

Commit 9b1f5fd

Browse files
authored
Merge pull request #2073 from kleros/chore/solc-0.8.30-viaIR-foundry
chore: viaIR compilation enabled for Foundry with explicit solc v0.8.30
2 parents 0cdc07d + e41ee56 commit 9b1f5fd

File tree

4 files changed

+18
-25
lines changed

4 files changed

+18
-25
lines changed

contracts/foundry.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11

22
[profile.default]
3+
solc = "0.8.30"
4+
via_ir = true
5+
optimizer = true
6+
optimizer_runs = 500
7+
optimizer_details = { yulDetails = { stackAllocation = true } }
8+
additional_compiler_profiles = [
9+
{ name = "tests", via_ir = false }
10+
]
11+
compilation_restrictions = [
12+
{ paths = "test/foundry/KlerosCore.t.sol", via_ir = false },
13+
]
314
src = 'src'
415
out = 'out'
516
libs = ['../node_modules', 'lib']
617

718
[rpc_endpoints]
819
arbitrumSepolia = "https://sepolia-rollup.arbitrum.io/rpc"
9-
arbitrumGoerli = "https://goerli-rollup.arbitrum.io/rpc"
1020
arbitrum = "https://arb1.arbitrum.io/rpc"
1121
sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}"
12-
goerli = "https://goerli.infura.io/v3/${INFURA_API_KEY}"
1322
mainnet = "https://mainnet.infura.io/v3/${INFURA_API_KEY}"
1423
chiado = "https://rpc.chiado.gnosis.gateway.fm"
1524
gnosischain = "https://rpc.gnosis.gateway.fm"

contracts/hardhat.config.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,7 @@ const config: HardhatUserConfig = {
3131
viaIR: true,
3232
optimizer: {
3333
enabled: true,
34-
runs: 100,
35-
},
36-
outputSelection: {
37-
"*": {
38-
"*": ["storageLayout"],
39-
},
40-
},
41-
},
42-
},
43-
{
44-
// For Vea
45-
version: "0.8.24",
46-
settings: {
47-
viaIR: true,
48-
optimizer: {
49-
enabled: true,
50-
runs: 100,
34+
runs: 10000,
5135
},
5236
outputSelection: {
5337
"*": {

contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
},
155155
"dependencies": {
156156
"@chainlink/contracts": "^1.4.0",
157-
"@kleros/vea-contracts": "^0.6.0",
157+
"@kleros/vea-contracts": "^0.7.0",
158158
"@openzeppelin/contracts": "^5.4.0",
159159
"@shutter-network/shutter-sdk": "0.0.2",
160160
"isomorphic-fetch": "^3.0.0"

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6123,7 +6123,7 @@ __metadata:
61236123
"@kleros/kleros-v2-eslint-config": "workspace:^"
61246124
"@kleros/kleros-v2-prettier-config": "workspace:^"
61256125
"@kleros/kleros-v2-tsconfig": "workspace:^"
6126-
"@kleros/vea-contracts": "npm:^0.6.0"
6126+
"@kleros/vea-contracts": "npm:^0.7.0"
61276127
"@logtail/pino": "npm:^0.5.0"
61286128
"@nomicfoundation/hardhat-chai-matchers": "npm:^2.1.0"
61296129
"@nomicfoundation/hardhat-ethers": "npm:^3.1.0"
@@ -6402,10 +6402,10 @@ __metadata:
64026402
languageName: node
64036403
linkType: hard
64046404

6405-
"@kleros/vea-contracts@npm:^0.6.0":
6406-
version: 0.6.0
6407-
resolution: "@kleros/vea-contracts@npm:0.6.0"
6408-
checksum: 10/1dafd94620d3392c2e00e09e7d1ca923007143f8625b4b584411a7b49404ae5630e870d3e260685964d37ccb9c4c4ab406523b8ec4dd9f89bcf6099a4f5976ec
6405+
"@kleros/vea-contracts@npm:^0.7.0":
6406+
version: 0.7.0
6407+
resolution: "@kleros/vea-contracts@npm:0.7.0"
6408+
checksum: 10/bba12886020cd4bfce39938de56edf2b56472627871ef91b10b721de655e5c20f632a8cb57679927d868375218007898b12033d769b7d33cd3f18447ca093896
64096409
languageName: node
64106410
linkType: hard
64116411

0 commit comments

Comments
 (0)