Skip to content
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

Deploy contracts using solc 0.8.23 for proper verification #231

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

haydenshively
Copy link
Member

0.8.17 has a bug which makes compiling non-deterministic depending on the solc backend, causing my local bytecode (compiled on macOS) to differ from Etherscan's (presumably linux-based compiler) and fail verification.

Also revamped the deploy scripts to avoid use of the experimental --multi flag.

via_ir = true
optimizer = true
optimizer_runs = 4294967295
optimizer_runs = 100000000
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the maximum supported by Etherscan's JSON parser.

Copy link

Changes to gas cost

Generated at commit: 79fc872aa0e747d3f06e27c07c527bb74ebaf4e7, compared to commit: 80bada32d7732aa4b1c95bb09cab26d6fed519b2

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
BorrowerDeployer deploy +7,217 ❌ +0.20%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
BorrowerDeployer 3,832,361 (+7,217) deploy 3,647,164 (+7,217) +0.20% 3,647,580 (+7,217) +0.20% 3,647,164 (+7,217) +0.20% 3,649,664 (+7,217) +0.20% 18 (0)
Borrower 3,610,463 (+7,209) borrow
liquidate
modify
repay
warn
0 (0)
118,429 (-169)
0 (0)
43,023 (-15)
0 (0)
+∞%
-0.14%
+∞%
-0.03%
+∞%
13,719 (-6)
178,024 (-175)
68,827 (-29)
43,023 (-15)
7,420 (-9)
-0.04%
-0.10%
-0.04%
-0.03%
-0.12%
17,783 (-9)
183,746 (-170)
95,045 (-48)
43,023 (-15)
0 (0)
-0.05%
-0.09%
-0.05%
-0.03%
+∞%
41,683 (-9)
226,176 (-191)
241,449 (-42)
43,023 (-15)
37,101 (-45)
-0.02%
-0.08%
-0.02%
-0.03%
-0.12%
16 (0)
4 (0)
26 (0)
1 (0)
5 (0)
VolatilityOracle 1,814,523 (+4,808) consult
prepare
update
15,472 (-4)
128,614 (-4)
0 (0)
-0.03%
-0.00%
+∞%
15,472 (-4)
128,614 (-4)
81,710 (+1)
-0.03%
-0.00%
+0.00%
15,472 (-4)
128,614 (-4)
81,710 (+1)
-0.03%
-0.00%
+0.00%
15,472 (-4)
128,614 (-4)
163,420 (+2)
-0.03%
-0.00%
+0.00%
1 (0)
5 (0)
2 (0)

@haydenshively haydenshively merged commit 2c6e694 into master Dec 15, 2023
3 of 4 checks passed
@haydenshively haydenshively deleted the deploy branch December 15, 2023 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant