consenlabs / tokenlon-contracts

Tokenlon is a decentralized exchange and payment settlement protocol based on blockchain technology. Visit https://tokenlon.im/
MIT License
87 stars 23 forks source link

Chore: cleanup and upgrade codebase #313

Closed alex0207s closed 2 months ago

alex0207s commented 3 months ago

Note

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

github-actions[bot] commented 3 months ago

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) |
github-actions[bot] commented 3 months ago

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) |