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

Chore: cleanup and upgrade codebase #313

Merged
merged 8 commits into from
Jul 19, 2024

Conversation

alex0207s
Copy link
Contributor

@alex0207s alex0207s commented Jul 2, 2024

  • upgrade solidity version from 0.8.17 to 0.8.26
  • ugrrade openzeppelin version from 4.9.2 to 5.0.2
  • remove unused token config
  • remove unused contracts
  • remove some redundant if statements and override modifiers

Note

After Solidity 0.8.8, there is no need to add the override modifier to a function that is inherited from interface contracts.

Copy link

github-actions bot commented Jul 2, 2024

Changes to gas cost

Generated at commit: 88004553474d819cf61668bdd34ab45ea04b1cc1, compared to commit: 32951ad4448c48bf7a98ab71c5d3cb3055152bc2

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %
AllowanceTarget spendFromUserTo
unpause
+1,714 ❌
+2,113 ❌
+3.46%
+9.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
AllowanceTarget 613,454 (-58,853) pause
spendFromUserTo
unpause
23,422 (0)
25,029 (-61)
23,423 (0)
0.00%
-0.24%
0.00%
26,608 (+354)
51,264 (+1,714)
25,536 (+2,113)
+1.35%
+3.46%
+9.02%
27,671 (0)
49,849 (+13,614)
25,536 (+2,113)
0.00%
+37.57%
+9.02%
27,671 (0)
91,606 (-74)
27,649 (+4,226)
0.00%
-0.08%
+18.04%
4 (+1)
8 (+1)
2 (+1)

Copy link

github-actions bot commented Jul 2, 2024

Changes to gas cost

Generated at commit: 88004553474d819cf61668bdd34ab45ea04b1cc1, compared to commit: 32951ad4448c48bf7a98ab71c5d3cb3055152bc2

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %
LimitOrderSwap fillLimitOrder
fillLimitOrderGroup
-247,004 ✅
-68,473 ✅
-17.32%
-28.15%
CoordinatedTaker approveTokens -4,458 ✅ -2.57%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
LimitOrderSwap 2,730,640 (-29,902) cancelOrder
fillLimitOrder
fillLimitOrderFullOrKill
fillLimitOrderGroup
29,257 (0)
36,094 (-20)
48,304 (+68)
31,168 (-167,201)
0.00%
-0.06%
+0.14%
-84.29%
40,674 (+4)
1,179,473 (-247,004)
104,056 (+22)
174,739 (-68,473)
+0.01%
-17.32%
+0.02%
-28.15%
33,862 (+6)
161,770 (-6,976)
48,304 (+68)
198,266 (-47,760)
+0.02%
-4.13%
+0.14%
-19.41%
52,767 (+6)
29,534,880 (-319)
215,562 (-68)
291,975 (-228)
+0.01%
-0.00%
-0.03%
-0.08%
7 (0)
28 (+5)
3 (0)
9 (+3)
RFQ 2,465,421 (-56,727) cancelRFQOffer
feeCollector
fillRFQ
fillRFQWithSig
setFeeCollector
23,996 (+30)
382 (-44)
31,822 (+4)
33,882 (+1)
23,793 (+22)
+0.13%
-10.33%
+0.01%
+0.00%
+0.09%
37,923 (+42)
382 (-44)
131,171 (+1,410)
113,442 (-46)
25,964 (+22)
+0.11%
-10.33%
+1.09%
-0.04%
+0.08%
38,918 (+45)
382 (-44)
147,976 (-107)
77,710 (+87)
23,998 (+22)
+0.12%
-10.33%
-0.07%
+0.11%
+0.09%
49,859 (+45)
382 (-44)
238,908 (+15,148)
228,734 (-228)
30,102 (+22)
+0.09%
-10.33%
+6.77%
-0.10%
+0.07%
4 (0)
2 (+1)
24 (+2)
3 (0)
3 (0)
CoordinatedTaker 2,367,349 (-57,222) approveTokens
submitLimitOrderFill
27,095 (-8)
33,103 (-17)
-0.03%
-0.05%
169,261 (-4,458)
128,473 (-21)
-2.57%
-0.02%
189,038 (-8,740)
70,073 (+29)
-4.42%
+0.04%
189,038 (-8,740)
256,667 (-124)
-4.42%
-0.05%
15 (+2)
7 (0)
SmartOrderStrategy 1,226,691 (-77,856) approveTokens
executeStrategy
56,282 (-2,254)
23,234 (-19)
-3.85%
-0.08%
185,084 (+1,612)
123,683 (+2,995)
+0.88%
+2.48%
268,806 (-14,615)
90,796 (+51,540)
-5.16%
+131.29%
268,806 (-14,615)
610,220 (-305)
-5.16%
-0.05%
33 (+6)
18 (+3)
GenericSwap 1,756,522 (-43,526) executeSwap
executeSwapWithSig
32,322 (+37)
39,528 (+27)
+0.11%
+0.07%
117,670 (-76)
168,429 (-90)
-0.06%
-0.05%
115,374 (-58)
175,155 (-79)
-0.05%
-0.05%
252,012 (-263)
283,880 (-226)
-0.10%
-0.08%
12 (0)
4 (0)

@alex0207s alex0207s requested review from NIC619 and 108356037 July 2, 2024 08:56
@alex0207s alex0207s force-pushed the chore/cleanup-and-upgrade-codebase branch from 25d088e to 019650b Compare July 16, 2024 09:32
@alex0207s alex0207s merged commit 9ef71e0 into fix-v6.0.1 Jul 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants